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

Unified Diff: safari/ext/background.js

Issue 29829611: Issue 6786 - Display the Safari App Extension migration page (Closed)
Patch Set: Created July 13, 2018, 5:36 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
« background.js ('K') | « background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: safari/ext/background.js
diff --git a/safari/ext/background.js b/safari/ext/background.js
index e1285516406776154d86338e2b40e47d955d0379..02df04739b07994f017bf2fe74a210f88803b13a 100644
--- a/safari/ext/background.js
+++ b/safari/ext/background.js
@@ -588,17 +588,14 @@
/* Options */
-
- ext.showOptions = function(callback)
+ ext.showPage = function(url, callback)
{
- var optionsUrl = safari.extension.baseURI + "options.html";
-
for (var id in pages)
{
var page = pages[id];
var tab = page._tab;
- if (page.url.href == optionsUrl && tab.browserWindow == safari.application.activeBrowserWindow)
+ if (page.url.href == url && tab.browserWindow == safari.application.activeBrowserWindow)
Sebastian Noack 2018/07/13 18:04:18 I just figured, this wouldn't work anyway as expec
Sebastian Noack 2018/07/13 18:06:37 Ignore that comment. It actually would work, since
kzar 2018/07/13 18:44:04 Yes, I originally made that mistake but noticed it
{
tab.activate();
if (callback)
@@ -607,9 +604,11 @@
}
}
- ext.pages.open(optionsUrl, callback);
+ ext.pages.open(url, callback);
};
+ ext.showOptions = ext.showPage.bind(this, safari.extension.baseURI + "options.html");
+
/* Windows */
ext.windows = {
// Safari doesn't provide as rich a windows API as Chrome does, so instead
« background.js ('K') | « background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld