Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1880 | 1880 |
1881 insertMessage(element, after, links); | 1881 insertMessage(element, after, links); |
1882 } | 1882 } |
1883 | 1883 |
1884 let texts = Notification.getLocalizedTexts(notification); | 1884 let texts = Notification.getLocalizedTexts(notification); |
1885 let titleElement = window.document.getElementById("abp-notification-title"); | 1885 let titleElement = window.document.getElementById("abp-notification-title"); |
1886 titleElement.textContent = texts.title; | 1886 titleElement.textContent = texts.title; |
1887 let messageElement = window.document.getElementById("abp-notification-messag e"); | 1887 let messageElement = window.document.getElementById("abp-notification-messag e"); |
1888 messageElement.innerHTML = ""; | 1888 messageElement.innerHTML = ""; |
1889 let docLinks = []; | 1889 let docLinks = []; |
1890 if ("links" in notification) | 1890 if (notification.links) |
Wladimir Palant
2014/07/09 18:51:46
How about |if (notification.links)| just in case t
saroyanm
2014/07/09 18:57:25
Good point.
| |
1891 for (let link of notification.links) | 1891 for (let link of notification.links) |
1892 docLinks.push(Utils.getDocLink(link)); | 1892 docLinks.push(Utils.getDocLink(link)); |
1893 | 1893 |
1894 insertMessage(messageElement, texts.message, docLinks); | 1894 insertMessage(messageElement, texts.message, docLinks); |
1895 | 1895 |
1896 messageElement.addEventListener("click", function(event) | 1896 messageElement.addEventListener("click", function(event) |
1897 { | 1897 { |
1898 let link = event.target; | 1898 let link = event.target; |
1899 while (link && link !== messageElement && link.localName !== "a") | 1899 while (link && link !== messageElement && link.localName !== "a") |
1900 link = link.parentNode; | 1900 link = link.parentNode; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1950 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], | 1950 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], |
1951 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] | 1951 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] |
1952 ]; | 1952 ]; |
1953 | 1953 |
1954 onShutdown.add(function() | 1954 onShutdown.add(function() |
1955 { | 1955 { |
1956 for (let window in UI.applicationWindows) | 1956 for (let window in UI.applicationWindows) |
1957 if (UI.isBottombarOpen(window)) | 1957 if (UI.isBottombarOpen(window)) |
1958 UI.toggleBottombar(window); | 1958 UI.toggleBottombar(window); |
1959 }); | 1959 }); |
LEFT | RIGHT |