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

Unified Diff: js/desktop-options.js

Issue 29712664: Issue 6432 - Hide remove button for additional filter lists (Closed)
Patch Set: Addressed Dave's comments Created March 2, 2018, 11:43 a.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 | « background.js ('k') | skin/desktop-options.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: js/desktop-options.js
===================================================================
--- a/js/desktop-options.js
+++ b/js/desktop-options.js
@@ -237,7 +237,18 @@
{
control.setAttribute("aria-checked", item.disabled == false);
if (isAcceptableAds(item.url) && this == collections.filterLists)
+ {
control.disabled = true;
+ }
+ else if (this == collections.filterLists)
+ {
+ // List preinstalled by administrators
+ getPref("additional_subscriptions", (additionalSubscriptions) =>
+ {
+ if (additionalSubscriptions.includes(item.url))
+ element.classList.add("non-removable");
+ });
+ }
}
let lastUpdateElement = element.querySelector(".last-update");
« no previous file with comments | « background.js ('k') | skin/desktop-options.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld