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

Unified Diff: popup.js

Issue 6257417939582976: Issue 2081 - Hide "Block element" option in the popup if the page is whitelisted (Closed)
Patch Set: Created March 3, 2015, 4:37 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 | skin/popup.css » ('j') | skin/popup.css » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: popup.js
===================================================================
--- a/popup.js
+++ b/popup.js
@@ -46,7 +46,7 @@
if (page)
{
if (isPageWhitelisted(page))
- document.getElementById("enabled").classList.add("off");
+ document.body.classList.add("disabled");
page.sendMessage({type: "get-clickhide-state"}, function(response)
{
@@ -79,8 +79,7 @@
function toggleEnabled()
{
- var enabledButton = document.getElementById("enabled")
- var disabled = enabledButton.classList.toggle("off");
+ var disabled = document.body.classList.toggle("disabled");
if (disabled)
{
var host = getDecodedHostname(page.url).replace(/^www\./, "");
« no previous file with comments | « no previous file | skin/popup.css » ('j') | skin/popup.css » ('J')

Powered by Google App Engine
This is Rietveld