diff --git a/css/options.css b/css/popup.css similarity index 100% rename from css/options.css rename to css/popup.css diff --git a/html/options.html b/html/popup.html similarity index 61% rename from html/options.html rename to html/popup.html index 3f78fe0..b1dd66e 100644 --- a/html/options.html +++ b/html/popup.html @@ -1,12 +1,12 @@ - - + +
- +
RubberGlove @@ -18,7 +18,10 @@
- Visit panopticlick.com to see it in action. +

+ Visit panopticlick.eff.org to see it in action.
+ View your Browser Object Model. +

Third-party cookies make fingerprinting unecessary. Disable third-party cookies in Chrome's privacy settings.

Plugins including Flash, Java, Quicktime and Silverlight expose additional information that's difficult to block. Plugins should be set to "Click to play" or disabled to minimize exposure.

diff --git a/js/bomOverride.js b/js/bomOverload.js similarity index 94% rename from js/bomOverride.js rename to js/bomOverload.js index 7e720b6..3242033 100644 --- a/js/bomOverride.js +++ b/js/bomOverload.js @@ -1,4 +1,4 @@ -window.navigator = window.clientInformation = function() { +var bomOverloadFunction = function() { var oldNavigator = navigator; var altNav = {}; var propertyNames = Object.getOwnPropertyNames(oldNavigator); @@ -113,10 +113,4 @@ window.navigator = window.clientInformation = function() { } } return altNav; -}(); - -if(document.currentScript.id == '_RubberGlove_removeHead') { - document.currentScript.parentNode.parentNode.removeChild(document.currentScript.parentNode); -} else { - document.currentScript.parentNode.removeChild(document.currentScript); } \ No newline at end of file diff --git a/js/injectScripts.js b/js/injectScripts.js index 826095a..22b1fb8 100644 --- a/js/injectScripts.js +++ b/js/injectScripts.js @@ -1,20 +1,12 @@ //console.log("RubberGlove: Content Script for " + window.location.href); +var compositeScript = + "window.navigator = window.clientInformation = (" + bomOverloadFunction.toString() + "());\n" + + "(" + scriptCleanupFunction.toString() + "());"; -function loadScript(name) { - var request = new XMLHttpRequest(); - request.open('GET', chrome.runtime.getURL(name), false); - request.send(null); - if (request.status === 200) { - return request.responseText; - } - console.error("RubberGlove: Failed to load " + name); - return; -} - -var pageScripts = document.createElement('script'); -pageScripts.type = 'text/javascript'; -pageScripts.async = false; -pageScripts.text = loadScript("js/bomOverride.js"); +var pageScript = document.createElement('script'); +pageScript.type = 'text/javascript'; +pageScript.async = false; +pageScript.text = compositeScript; var html = document.documentElement var headTags = document.getElementsByTagName("head"); @@ -22,7 +14,7 @@ var head = headTags.length > 0 ? head = headTags[0] : null; if(!head || head != html.firstChild) { head = document.createElement('head'); html.insertBefore(head, html.firstChild); - pageScripts.id = "_RubberGlove_removeHead"; + pageScript.id = "_RubberGlove_removeHead"; } window.addEventListener("message", function(event) { if(event.source != window) return; @@ -34,4 +26,4 @@ window.addEventListener("message", function(event) { }); } }); -head.insertBefore(pageScripts, head.firstChild); +head.insertBefore(pageScript, head.firstChild); diff --git a/js/options.js b/js/popup.js similarity index 100% rename from js/options.js rename to js/popup.js diff --git a/js/scriptCleanup.js b/js/scriptCleanup.js new file mode 100644 index 0000000..c4bdc57 --- /dev/null +++ b/js/scriptCleanup.js @@ -0,0 +1,6 @@ +var scriptCleanupFunction = function() { + if(document.currentScript.id == '_RubberGlove_removeHead') + document.currentScript.parentNode.parentNode.removeChild(document.currentScript.parentNode); + else + document.currentScript.parentNode.removeChild(document.currentScript); +} \ No newline at end of file diff --git a/manifest.json b/manifest.json index 88b9049..9a9320e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,10 @@ { "manifest_version": 2, "name": "RubberGlove", + "short_name": "RubberGlove", + "version": "14.7.7.2", "author": "Jason S. Clary", "description": "Blocks common browser fingerprint techniques to improve your privacy.", - "version": "14.7.7.1", "icons": { "16": "images/icon16.png", "19": "images/icon19.png", @@ -14,8 +15,17 @@ }, "content_scripts": [ { - "matches": [ "*://*/*", "https://*/*", "file://*/*" ], - "js": ["js/injectScripts.js"], + "matches": [ + "http://*/*", + "https://*/*", + "file://*/*", + "ftp://*/*" + ], + "js": [ + "js/bomOverload.js", + "js/scriptCleanup.js", + "js/injectScripts.js" + ], "run_at": "document_start", "all_frames": true } @@ -26,14 +36,11 @@ }, "browser_action": { "default_icon": "images/icon19.png", - "default_popup": "html/options.html" + "default_popup": "html/popup.html" }, "permissions": [ "tabs", "privacy" ], - "web_accessible_resources": [ - "js/bomOverride.js" - ], "incognito": "spanning" } \ No newline at end of file