Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mskasal committed May 13, 2019
0 parents commit 22e63b9
Show file tree
Hide file tree
Showing 13 changed files with 6,660 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.idea/
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"fingerprintjs"
]
}
16 changes: 16 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
presets: [
[
"@babel/preset-env",
{
targets: {
esmodules: true
}
}
]
],
plugins: [
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties"
]
};
1 change: 1 addition & 0 deletions dist/fingerprint.js

Large diffs are not rendered by default.

Binary file added dist/fingerprint.js.gz
Binary file not shown.
1 change: 1 addition & 0 deletions examples/browser/fingerprint.js

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions examples/browser/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<script src="./fingerprint.js"></script>
<title>Browser example</title>
</head>
<body>
<div id="root"></div>

<script>
var uniqueId;
var fingerprint = new Fingerprint();
// options = {
// COOKIE_NAME: "__fingerprint",
// COOKIE_EXPIRE_TIME: 12,
// // Fingerprint options check https://github.com/Valve/fingerprintjs2
// fpParams: {
// fonts: { extendedJsFonts: false }
// }
// };

fingerprint.generate(function(id) {
console.log(id);
uniqueId = id;

document.getElementById("root").innerHTML =
" This is a browser example where and api is called to generate first fingerprint " +
uniqueId;
});
</script>
</body>
</html>
Loading

0 comments on commit 22e63b9

Please sign in to comment.