Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: go-back-with-backspace/pages/options.js

Issue 2400303003: Update UI and catch executeScript errors now shown in Canary (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: go-back-with-backspace/pages/options.js
diff --git a/go-back-with-backspace/pages/options.js b/go-back-with-backspace/pages/options.js
index 9ff25d65f1c7564e76834ea643093fd4fa7893ba..b95b45f66b6b7902bab6d9af2a71e97a57060008 100644
--- a/go-back-with-backspace/pages/options.js
+++ b/go-back-with-backspace/pages/options.js
@@ -2,6 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Disable the whitelist field when it's not relevant.
+function updateEnabledInputs() {
+ var checkbox = document.getElementById('disableInApplets');
+ document.getElementById('whitelist').disabled = !checkbox.checked;
+}
+
// Initialize the page.
function init() {
LoadInternationalizedStrings();
@@ -37,6 +43,8 @@ function init() {
});
};
+ checkbox.onchange = updateEnabledInputs;
+
document.getElementById('cancel_button').onclick = function() {
window.close();
};
@@ -54,6 +62,8 @@ function init() {
blacklist.value = items.blacklist.join('\n');
checkbox.checked = items.disableInApplets;
whitelist.value = items.whitelist.join('\n');
+
+ updateEnabledInputs();
});
}
« go-back-with-backspace/manifest.json ('K') | « go-back-with-backspace/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698