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

Delta Between Two Patch Sets: lib/ui.js

Issue 29338861: Issue 3851 - Implement subscribe link handling via process scripts (Closed)
Left Patch Set: Created March 21, 2016, 7:25 p.m.
Right Patch Set: Added guard and removed dead code Created April 18, 2016, 3:36 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/child/subscribeLinks.js ('K') | « lib/child/subscribeLinks.js ('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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 let button = window.document.getElementById("abp-toolbarbutton") 438 let button = window.document.getElementById("abp-toolbarbutton")
439 || window.document.getElementById("abp-status"); 439 || window.document.getElementById("abp-status");
440 if (!button) 440 if (!button)
441 return; 441 return;
442 442
443 this._showNotification(window, button, notification); 443 this._showNotification(window, button, notification);
444 }); 444 });
445 445
446 // Add "anti-adblock messages" notification 446 // Add "anti-adblock messages" notification
447 initAntiAdblockNotification(); 447 initAntiAdblockNotification();
448
449 // Frame script URL has to be randomized due to caching
450 // (see https://bugzilla.mozilla.org/show_bug.cgi?id=1051238)
451 let frameScript = "chrome://adblockplus/content/subscribeLinkHandler.js?" + Math.random();
Erik 2016/04/06 03:11:41 should this line not be removed too?
Wladimir Palant 2016/04/18 15:38:40 Done.
452 448
453 // Initialize subscribe link handling 449 // Initialize subscribe link handling
454 port.on("subscribeLinkClick", data => this.subscribeLinkClicked(data)); 450 port.on("subscribeLinkClick", data => this.subscribeLinkClicked(data));
455 451
456 // Execute first-run actions if a window is open already, otherwise it 452 // Execute first-run actions if a window is open already, otherwise it
457 // will happen in applyToWindow() when a window is opened. 453 // will happen in applyToWindow() when a window is opened.
458 this.firstRunActions(this.currentWindow); 454 this.firstRunActions(this.currentWindow);
459 }, 455 },
460 456
461 addToolbarButton: function() 457 addToolbarButton: function()
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)], 1892 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)],
1897 ["abp-command-toggleshownotifications", "command", Notification.toggleIgnoreCa tegory.bind(Notification, "*", null)] 1893 ["abp-command-toggleshownotifications", "command", Notification.toggleIgnoreCa tegory.bind(Notification, "*", null)]
1898 ]; 1894 ];
1899 1895
1900 onShutdown.add(function() 1896 onShutdown.add(function()
1901 { 1897 {
1902 for (let window of UI.applicationWindows) 1898 for (let window of UI.applicationWindows)
1903 if (UI.isBottombarOpen(window)) 1899 if (UI.isBottombarOpen(window))
1904 UI.toggleBottombar(window); 1900 UI.toggleBottombar(window);
1905 }); 1901 });
LEFTRIGHT

Powered by Google App Engine
This is Rietveld