Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: popup.js

Issue 5251080904507392: Got rid of classList.toggle() with second argument for compatibility with Safari (Closed)
Patch Set: Created Dec. 21, 2013, 6:59 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: popup.js
===================================================================
--- a/popup.js
+++ b/popup.js
@@ -66,11 +66,13 @@
win.getActiveTab(function(t)
{
tab = t;
- document.getElementById("enabled").classList.toggle("off", isWhitelisted(tab.url));
+ if (isWhitelisted(tab.url))
+ document.getElementById("enabled").classList.add("off");
tab.sendMessage({type: "get-clickhide-state"}, function(response)
{
- document.body.classList.toggle("clickhide-active", response && response.active);
+ if (response && response.active)
+ document.body.classList.add("clickhide-active");
});
});
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld