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 Thomas's comments Created March 6, 2018, 3:03 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 | « desktop-options.html ('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,8 +237,19 @@
{
control.setAttribute("aria-checked", item.disabled == false);
if (isAcceptableAds(item.url) && this == collections.filterLists)
+ {
control.disabled = true;
+ }
}
+ getPref("additional_subscriptions", (additionalSubscriptions) =>
Thomas Greiner 2018/03/07 17:45:38 I just noticed that this is called each time we up
saroyanm 2018/03/08 18:03:36 Done, we still need to refactor code to avoid the
Thomas Greiner 2018/03/08 19:28:19 I agree that this can be tackled separately as par
+ {
+ if (additionalSubscriptions.includes(item.url))
+ {
+ element.classList.add("preconfigured");
+ if (this == collections.protection)
Thomas Greiner 2018/03/07 17:45:38 We tend to avoid hard-coding behavior for specific
saroyanm 2018/03/08 18:03:36 Done.
+ controls[0].disabled = true;
+ }
+ });
let lastUpdateElement = element.querySelector(".last-update");
if (lastUpdateElement)
« no previous file with comments | « desktop-options.html ('k') | skin/desktop-options.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld