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

Unified Diff: options.js

Issue 29522601: Noissue - Use includes instead of indexOf (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Aug. 21, 2017, 11:16 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 | « lib/notificationHelper.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: options.js
===================================================================
--- a/options.js
+++ b/options.js
@@ -657,17 +657,17 @@
if (!confirm(i18n.getMessage("global_remove_subscription_warning")))
return;
removeSubscription(subscription.url);
}, false);
getPref("additional_subscriptions", additionalSubscriptions =>
{
- if (additionalSubscriptions.indexOf(subscription.url) != -1)
+ if (additionalSubscriptions.includes(subscription.url))
removeButton.style.visibility = "hidden";
});
let enabled = element.getElementsByClassName("subscriptionEnabled")[0];
enabled.addEventListener("click", () =>
{
subscription.disabled = !subscription.disabled;
toggleSubscription(subscription.url, true);
« no previous file with comments | « lib/notificationHelper.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld