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) |
{ |
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 |