Skip to content

Commit

Permalink
Don't use localStorage by default
Browse files Browse the repository at this point in the history
  • Loading branch information
npny committed Apr 11, 2016
1 parent 558f24d commit 71f6ea9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ var rules, domain, locale, root;

function start() {

if(!window.localStorage["rules"]) window.localStorage["rules"] = JSON.stringify(defaultRules);
window.forkRulesLocally = () => window.localStorage["rules"] = JSON.stringify(defaultRules);

rules = JSON.parse(window.localStorage["rules"]);
rules = window.localStorage["rules"] ? JSON.parse(window.localStorage["rules"]) : defaultRules;
domain = window.location.pathname.substring(6); // Substring 6 turns (developer.mozilla.org)/en-US/docs/* into simply /docs/*, for scoping

// The locale can be determined from either a hidden input on the page or from the language selector
Expand Down

0 comments on commit 71f6ea9

Please sign in to comment.