hexo/node_modules/browser-fingerprint/index.js

23 lines
378 B
JavaScript
Raw Normal View History

2023-09-25 15:58:56 +08:00
'use strict'
let pad = (str, size) => ('000000000' + str).slice(-size)
let count = (() => {
let count = 0
let window = window || global
for (let i in window) {
count++
}
return count;
}())
let globalCount = () => count
export default () => pad(
(navigator.mimeTypes.length + navigator.userAgent.length).toString(36) +
globalCount().toString(36),
4
)