mirror of
https://github.com/moparisthebest/FireTray
synced 2025-03-11 14:59:41 -04:00
cleaning
This commit is contained in:
parent
1a90dbe179
commit
1765258679
@ -478,13 +478,15 @@ firetray.VersionChangeHandler = {
|
||||
this.openBrowserTab(url);
|
||||
|
||||
else if (firetray.Handler.appId === FIRETRAY_APP_DB['zotero']['id']) {
|
||||
let win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
if (!win)
|
||||
log.error("Zotero main-window not found");
|
||||
else
|
||||
let win = null;
|
||||
if (win = Services.wm.getMostRecentWindow("zotero:basicViewer")) {
|
||||
win.loadURI(uri);
|
||||
} else if (win = Services.wm.getMostRecentWindow("navigator:browser")) {
|
||||
win.openDialog("chrome://zotero/content/standalone/basicViewer.xul",
|
||||
"basicViewer",
|
||||
"chrome,resizable,centerscreen,menubar,scrollbars", url);
|
||||
} else
|
||||
log.error("Zotero main-window not found");
|
||||
|
||||
} else {
|
||||
this.openSystemBrowser(url);
|
||||
@ -527,6 +529,7 @@ firetray.VersionChangeHandler = {
|
||||
},
|
||||
|
||||
openSystemBrowser: function(url) {
|
||||
log.debug("openSystemBrowser");
|
||||
try {
|
||||
var uri = Services.io.newURI(url, null, null);
|
||||
var handler = Cc['@mozilla.org/uriloader/external-protocol-service;1']
|
||||
|
Loading…
x
Reference in New Issue
Block a user