scratch – Blame information for rev 58
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
58 | office | 1 | <!doctype html> |
2 | <html> |
||
3 | <head> |
||
4 | <title>Fingerprintjs2 test</title> |
||
5 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
||
6 | <script> |
||
7 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
||
8 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
||
9 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
||
10 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
||
11 | |||
12 | ga('create', 'UA-42202458-2', 'auto'); |
||
13 | ga('send', 'pageview'); |
||
14 | </script> |
||
15 | <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> |
||
16 | <style> |
||
17 | body{ |
||
18 | font-family: sans-serif; |
||
19 | max-width: 48em; |
||
20 | margin: auto; |
||
21 | padding: 0 5%; |
||
22 | background: #222; |
||
23 | color: #fff; |
||
24 | } |
||
25 | |||
26 | h1 { |
||
27 | margin: 2em 0 0; |
||
28 | } |
||
29 | |||
30 | p { |
||
31 | font-size: 1.2em |
||
32 | } |
||
33 | |||
34 | button { |
||
35 | border: none; |
||
36 | color: #fff; |
||
37 | font-size: 1.2em; |
||
38 | background: #27e; |
||
39 | padding: 0.5em 0.75em 0.6em; |
||
40 | border-radius: 3px; |
||
41 | box-shadow: 0 3px 0 #05c; |
||
42 | outline: none; |
||
43 | } |
||
44 | |||
45 | button:active { |
||
46 | transform: translateY(3px); |
||
47 | box-shadow: none; |
||
48 | } |
||
49 | |||
50 | strong { |
||
51 | display: block; |
||
52 | letter-spacing: 1px; |
||
53 | word-wrap: break-word; |
||
54 | } |
||
55 | |||
56 | @media (min-width: 32em) { |
||
57 | h1 { |
||
58 | font-size: 4em; |
||
59 | } |
||
60 | |||
61 | strong { |
||
62 | font-size: 1.5em; |
||
63 | } |
||
64 | } |
||
65 | </style> |
||
66 | </head> |
||
67 | <body> |
||
68 | <div id="container"></div> |
||
69 | |||
70 | |||
71 | <h1>Fingerprintjs2</h1> |
||
72 | |||
73 | <p>Your browser fingerprint: <strong id="fp"></strong></p> |
||
74 | <p><code id="time"/></p> |
||
75 | <p><span id="details"/></p> |
||
76 | <button type="button" id="btn">Get my fingerprint</button> |
||
77 | |||
78 | <a href="https://github.com/Valve/fingerprintjs2"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a> |
||
79 | |||
80 | <script src="fingerprint2.js"></script> |
||
81 | <script> |
||
82 | $("#btn").on("click", function () { |
||
83 | var d1 = new Date(); |
||
84 | var fp = new Fingerprint2(); |
||
85 | fp.get(function(result, components) { |
||
86 | var d2 = new Date(); |
||
87 | var timeString = "Time took to calculate the fingerprint: " + (d2 - d1) + "ms"; |
||
88 | var details = "<strong>Detailed information: </strong><br />"; |
||
89 | if(typeof window.console !== "undefined") { |
||
90 | console.log(timeString); |
||
91 | console.log(result); |
||
92 | for (var index in components) { |
||
93 | var obj = components[index]; |
||
94 | var value = obj.value; |
||
95 | var line = obj.key + " = " + value.toString().substr(0, 100); |
||
96 | console.log(line); |
||
97 | details += line + "<br />"; |
||
98 | } |
||
99 | } |
||
100 | $("#details").html(details); |
||
101 | $("#fp").text(result); |
||
102 | $("#time").text(timeString); |
||
103 | }); |
||
104 | }); |
||
105 | </script> |
||
106 | </body> |
||
107 | </html> |