Index: lib/ui.js |
=================================================================== |
--- a/lib/ui.js |
+++ b/lib/ui.js |
@@ -891,17 +891,17 @@ let UI = exports.UI = |
if (!match) |
return; |
// Decode URL parameters |
let title = null; |
let url = null; |
let mainSubscriptionTitle = null; |
let mainSubscriptionURL = null; |
- for each (let param in match[1].split('&')) |
+ for (let param of match[1].split('&')) |
{ |
let parts = param.split("=", 2); |
if (parts.length != 2 || !/\S/.test(parts[1])) |
continue; |
switch (parts[0]) |
{ |
case "title": |
title = decodeURIComponent(parts[1]); |
@@ -1318,17 +1318,17 @@ let UI = exports.UI = |
let node = window.document.tooltipNode; |
if (!node || !node.hasAttribute("tooltip")) |
{ |
event.preventDefault(); |
return; |
} |
// Prevent tooltip from overlapping menu |
- for each (let id in ["abp-toolbar-popup", "abp-status-popup"]) |
+ for (let id of ["abp-toolbar-popup", "abp-status-popup"]) |
{ |
let element = E(id); |
if (element && element.state == "open") |
{ |
event.preventDefault(); |
return; |
} |
} |
@@ -1786,17 +1786,17 @@ let UI = exports.UI = |
/** |
* Hide contribute button and persist this choice. |
*/ |
hideContributeButton: function(/**Window*/ window) |
{ |
Prefs.hideContributeButton = true; |
- for each (let id in ["abp-status-contributebutton", "abp-toolbar-contributebutton", "abp-menuitem-contributebutton"]) |
+ for (let id of ["abp-status-contributebutton", "abp-toolbar-contributebutton", "abp-menuitem-contributebutton"]) |
{ |
let button = window.document.getElementById(id); |
if (button) |
button.hidden = true; |
} |
}, |
showNextNotification: function(url) |
@@ -1846,17 +1846,17 @@ let UI = exports.UI = |
} |
let texts = Notification.getLocalizedTexts(notification); |
let titleElement = window.document.getElementById("abp-notification-title"); |
titleElement.textContent = texts.title; |
let messageElement = window.document.getElementById("abp-notification-message"); |
messageElement.innerHTML = ""; |
let docLinks = []; |
- for each (let link in notification.links) |
+ for (let link of notification.links) |
docLinks.push(Utils.getDocLink(link)); |
insertMessage(messageElement, texts.message, docLinks); |
messageElement.addEventListener("click", function(event) |
{ |
let link = event.target; |
while (link && link !== messageElement && link.localName !== "a") |
link = link.parentNode; |