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: Created March 1, 2018, 9:43 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
« background.js ('K') | « 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)
saroyanm 2018/03/01 21:52:34 I wonder if I also should consider the case of rem
Thomas Greiner 2018/03/02 11:33:35 This if-statement is redundant because in the CSS
Thomas Greiner 2018/03/02 11:33:36 You're right that we should also consider other pl
saroyanm 2018/03/02 13:50:29 Done.
saroyanm 2018/03/02 13:50:29 Done. I moved implementation out of the for loop,
+ {
+ // List preinstalled by administrators
Thomas Greiner 2018/03/02 11:33:35 Detail: This is already documented under https://h
saroyanm 2018/03/02 13:50:29 Done.
+ getPref("additional_subscriptions", (additionalSubscriptions) =>
+ {
+ if (additionalSubscriptions.includes(item.url))
+ element.classList.add("non-removable");
Thomas Greiner 2018/03/02 11:33:35 Detail: What about keeping the name more objective
saroyanm 2018/03/02 13:50:29 Done.
+ });
+ }
}
let lastUpdateElement = element.querySelector(".last-update");
« background.js ('K') | « background.js ('k') | skin/desktop-options.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld