Fix Zotero.Integration.activate() with no args in Mac Aurora/Nightly

This is only used when there is a window open in the background anyway
This commit is contained in:
Simon Kornblith 2013-12-16 20:27:15 -05:00
parent d182665173
commit 83bc0628db

View file

@ -313,7 +313,8 @@ Zotero.Integration = new function() {
const BUNDLE_IDS = { const BUNDLE_IDS = {
"Zotero":"org.zotero.zotero", "Zotero":"org.zotero.zotero",
"Firefox":"org.mozilla.firefox", "Firefox":"org.mozilla.firefox",
"Minefield":"org.mozilla.minefield" "Aurora":"org.mozilla.aurora",
"Nightly":"org.mozilla.nightly"
}; };
if(win) { if(win) {
@ -353,13 +354,7 @@ Zotero.Integration = new function() {
); );
}, false); }, false);
} else { } else {
if(Zotero.oscpu == "PPC Mac OS X 10.4" || Zotero.oscpu == "Intel Mac OS X 10.4" _executeAppleScript('tell application id "'+BUNDLE_IDS[Zotero.appName]+'" to activate');
|| !BUNDLE_IDS[Zotero.appName]) {
// 10.4 doesn't support "tell application id"
_executeAppleScript('tell application "'+Zotero.appName+'" to activate');
} else {
_executeAppleScript('tell application id "'+BUNDLE_IDS[Zotero.appName]+'" to activate');
}
} }
} else if(!Zotero.isWin && win) { } else if(!Zotero.isWin && win) {
Components.utils.import("resource://gre/modules/ctypes.jsm"); Components.utils.import("resource://gre/modules/ctypes.jsm");