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

Delta Between Two Patch Sets: options.js

Issue 29327244: Issue 3024 - Added opt-out to Chrome notifications (Closed)
Left Patch Set: Created Sept. 10, 2015, 6:46 p.m.
Right Patch Set: Made `getNotificationButtons` independent of external variables Created Sept. 11, 2015, 2:37 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« lib/notificationHelper.js ('K') | « options.html ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 function onMessage(msg) 107 function onMessage(msg)
108 { 108 {
109 if (msg.type == "add-subscription") 109 if (msg.type == "add-subscription")
110 startSubscriptionSelection(msg.title, msg.url); 110 startSubscriptionSelection(msg.title, msg.url);
111 else if (msg.type == "focus-section") 111 else if (msg.type == "focus-section")
112 { 112 {
113 var tabs = document.getElementsByClassName("ui-tabs-panel"); 113 var tabs = document.getElementsByClassName("ui-tabs-panel");
114 for (var i = 0; i < tabs.length; i++) 114 for (var i = 0; i < tabs.length; i++)
115 { 115 {
116 var found = tabs[i].querySelector("[data-section='" + msg.section + "'"); 116 var found = tabs[i].querySelector("[data-section='" + msg.section + "']");
Sebastian Noack 2015/09/11 10:58:26 It seems you forgot the closing ']' in the selecto
Thomas Greiner 2015/09/11 12:51:48 Done. Apparently, both `document.querySelector("[
Sebastian Noack 2015/09/11 13:09:54 My guess would be, that some popular browser didn'
117 if (!found) 117 if (!found)
118 continue; 118 continue;
119 119
120 var previous = document.getElementsByClassName("focused"); 120 var previous = document.getElementsByClassName("focused");
121 if (previous.length > 0) 121 if (previous.length > 0)
122 previous[0].classList.remove("focused"); 122 previous[0].classList.remove("focused");
123 123
124 var tab = $("[href='#" + tabs[i].id + "']"); 124 var tab = $("[href='#" + tabs[i].id + "']");
125 $("#tabs").tabs("select", tab.parent().index()); 125 $("#tabs").tabs("select", tab.parent().index());
126 found.classList.add("focused"); 126 found.classList.add("focused");
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 links[i].href = arguments[i + 1]; 682 links[i].href = arguments[i + 1];
683 links[i].setAttribute("target", "_blank"); 683 links[i].setAttribute("target", "_blank");
684 } 684 }
685 else if (typeof arguments[i + 1] == "function") 685 else if (typeof arguments[i + 1] == "function")
686 { 686 {
687 links[i].href = "javascript:void(0);"; 687 links[i].href = "javascript:void(0);";
688 links[i].addEventListener("click", arguments[i + 1], false); 688 links[i].addEventListener("click", arguments[i + 1], false);
689 } 689 }
690 } 690 }
691 } 691 }
LEFTRIGHT
« options.html ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld