Skip to content

Instantly share code, notes, and snippets.

@felipc
Last active March 17, 2017 16:02
Show Gist options
  • Save felipc/57bed010dc962f86804ed7a531bb65cd to your computer and use it in GitHub Desktop.
Save felipc/57bed010dc962f86804ed7a531bb65cd to your computer and use it in GitHub Desktop.
Testing flash block:
- Using Nightly from Mar-16 or newer:
1 - set the pref "devtools.chrome.enabled" to true
2 - open Web Developer -> Browser Console
3 - Paste this giant snippet on it and press Enter: (This will remove the built-in URLs from the classifier)
Preferences.set("plugins.flashBlock.enabled",true);
Preferences.set("urlclassifier.flashAllowTable","allow-flashallow-digest256");
Preferences.set("urlclassifier.flashAllowExceptTable","except-flashallow-digest256");
Preferences.set("urlclassifier.flashTable","block-flash-digest256");
Preferences.set("urlclassifier.flashExceptTable","except-flash-digest256");
Preferences.set("urlclassifier.flashSubDocTable","block-flashsubdoc-digest256");
Preferences.set("urlclassifier.flashSubDocExceptTable","except-flashsubdoc-digest256");
4 - Restart the browser
5 - Now test that the testcases *FAIL* as expected (everything should be showing the gray Ask-To-Activate overlay).
Now let's add the URLs from the Shavar service:
6 - Open browser console again to paste and Enter:
Preferences.set("browser.safebrowsing.provider.mozilla.updateURL",Preferences.get("browser.safebrowsing.provider.mozilla.updateURL").replace("shavar.services.mozilla.com/", "shavar.stage.mozaws.net/"));
Preferences.set("browser.safebrowsing.provider.mozilla.nextupdatetime","1");
7 - Restart the browser
Now the testcases should work again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment