1 $("#flashcontent").flash(
3 "src": "/resources/fonts2.swf",
6 "swliveconnect": "true",
7 "id": "flashfontshelper",
8 "name": "flashfontshelper"
13 function identify_plugins(){
14 // fetch and serialize plugins
16 // in Mozilla and in fact most non-IE browsers, this is easy
17 if (navigator.plugins) {
18 var np = navigator.plugins;
19 var plist = new Array();
20 // sorting navigator.plugins is a right royal pain
21 // but it seems to be necessary because their order
22 // is non-constant in some browsers
23 for (var i = 0; i < np.length; i++) {
24 plist[i] = np[i].name + "; ";
25 plist[i] += np[i].description + "; ";
26 plist[i] += np[i].filename + ";";
27 for (var n = 0; n < np[i].length; n++) {
28 plist[i] += " (" + np[i][n].description +"; "+ np[i][n].type +
29 "; "+ np[i][n].suffixes + ")";
34 for (i = 0; i < np.length; i++)
35 plugins+= "Plugin "+i+": " + plist[i];
37 // in IE, things are much harder; we use PluginDetect to get less
38 // information (only the plugins listed below & their version numbers)
41 pp[0] = "Java"; pp[1] = "QuickTime"; pp[2] = "DevalVR"; pp[3] = "Shockwave";
42 pp[4] = "Flash"; pp[5] = "WindowsMediaplayer"; pp[6] = "Silverlight";
46 version = PluginDetect.getVersion(pp[p]);
48 plugins += pp[p] + " " + version + "; "
50 plugins += ieAcrobatVersion();
55 function ieAcrobatVersion() {
56 // estimate the version of Acrobat on IE using horrible horrible hacks
57 if (window.ActiveXObject) {
58 for (var x = 2; x < 10; x++) {
60 oAcro=eval("new ActiveXObject('PDF.PdfCtrl."+x+"');");
62 return "Adobe Acrobat version" + x + ".?";
66 oAcro4=new ActiveXObject('PDF.PdfCtrl.1');
68 return "Adobe Acrobat version 4.?";
71 oAcro7=new ActiveXObject('AcroPDF.PDF.1');
73 return "Adobe Acrobat version 7.?";
79 function get_fonts() {
82 var obj = document.getElementById("flashfontshelper");
83 if (obj && typeof(obj.GetVariable) != "undefined") {
84 fonts = obj.GetVariable("/:user_fonts");
85 fonts = fonts.replace(/,/g,", ");
86 fonts += " (via Flash)";
90 var javafontshelper = document.getElementById("javafontshelper");
91 var jfonts = javafontshelper.getFontList();
92 for (var n = 0; n < jfonts.length; n++) {
93 fonts = fonts + jfonts[n] + ", ";
95 fonts += " (via Java)";
99 fonts = "No Flash or Java fonts detected";
103 function set_dom_storage(){
105 localStorage.panopticlick = "yea";
106 sessionStorage.panopticlick = "yea";
110 function test_dom_storage(){
113 if (localStorage.panopticlick == "yea") {
114 supported += "DOM localStorage: Yes";
116 supported += "DOM localStorage: No";
118 } catch (ex) { supported += "DOM localStorage: No"; }
121 if (sessionStorage.panopticlick == "yea") {
122 supported += ", DOM sessionStorage: Yes";
124 supported += ", DOM sessionStorage: No";
126 } catch (ex) { supported += ", DOM sessionStorage: No"; }
131 function test_ie_userdata(){
133 oPersistDiv.setAttribute("remember", "remember this value");
134 oPersistDiv.save("oXMLStore");
135 oPersistDiv.setAttribute("remember", "overwritten!");
136 oPersistDiv.load("oXMLStore");
137 if ("remember this value" == (oPersistDiv.getAttribute("remember"))) {
138 return ", IE userData: Yes";
140 return ", IE userData: No";
143 return ", IE userData: No";
150 function retry_post() {
151 retries = retries -1;
152 if (success || retries == 0)
155 fetch_client_whorls()
158 function fetch_client_whorls(){
159 // fetch client-side vars
160 var whorls = new Object();
162 // this is a backup plan
163 setTimeout("retry_post()",1100);
166 whorls['plugins'] = identify_plugins();
168 whorls['plugins'] = "permission denied";
171 whorls['fonts'] = get_fonts();
174 whorls['timezone'] = new Date().getTimezoneOffset();
176 whorls['timezone'] = "permission denied";
180 whorls['video'] = screen.width+"x"+screen.height+"x"+screen.colorDepth;
182 whorls['video'] = "permission denied";
185 whorls['supercookies'] = test_dom_storage() + test_ie_userdata();
187 // send to server for logging / calculating
189 $.post("/SaveDetails.php?saveData=true", whorls,
192 $('#content').html(input);
200 $(document).ready(function(){
201 // wait some time for the flash font detection:
202 setTimeout("fetch_client_whorls()",1000);