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

Unified Diff: notification.js

Issue 16067002: Added Safari Support (Closed)
Patch Set: Created Oct. 21, 2013, 8:11 p.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
« chrome/background.js ('K') | « metadata.safari ('k') | options.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: notification.js
===================================================================
--- a/notification.js
+++ b/notification.js
@@ -15,7 +15,7 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
-var backgroundPage = chrome.extension.getBackgroundPage();
+var backgroundPage = ext.backgroundPage.getDOMWindow();
var require = backgroundPage.require;
var Utils = require("utils").Utils;
@@ -85,7 +85,7 @@
return;
event.preventDefault();
event.stopPropagation();
- chrome.tabs.create({url: link.href});
+ ext.windows.getLastFocused(function(win) { win.openTab(link.href); });
});
var notificationElement = document.getElementById("notification");
« chrome/background.js ('K') | « metadata.safari ('k') | options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld