commit 1bc98edba499ef178501ba92746c7aa725a4aeb3
parent ce355357ae7d9c42d86f26ec86f787a2ba8dce9f
Author: Simon Kornblith <simon@simonster.com>
Date: Mon, 29 Oct 2012 18:04:42 -0400
Merge branch '3.0'
Conflicts:
chrome/content/zotero/xpcom/translation/translate_firefox.js
install.rdf
update.rdf
Diffstat:
5 files changed, 15 insertions(+), 29 deletions(-)
diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js
@@ -41,18 +41,6 @@ const ZoteroStandalone = new function() {
ZoteroPane.init();
ZoteroPane.makeVisible();
- // Run check for corrupt installation, where the wrong Gecko runtime is being used
- if(Zotero.isMac && Zotero.isStandalone) {
- var greDir = Components.classes["@mozilla.org/file/directory_service;1"]
- .getService(Components.interfaces.nsIProperties)
- .get("GreD", Components.interfaces.nsIFile);
- if(greDir.isSymlink() || greDir.leafName !== "Current") {
- var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
- .getService(Components.interfaces.nsIPromptService);
- ps.alert(null, "", Zotero.getString('standalone.corruptInstallation'));
- }
- }
-
// Don't ask before handing http and https URIs
var eps = Components.classes['@mozilla.org/uriloader/external-protocol-service;1']
.getService(Components.interfaces.nsIExternalProtocolService);
diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js
@@ -667,8 +667,9 @@ Zotero.HTTP = new function() {
* @inner
*/
var onLoad = function() {
- var doc = hiddenBrowser.contentDocument,
- url = doc.location.href.toString();
+ var doc = hiddenBrowser.contentDocument;
+ if(!doc) return;
+ var url = doc.location.href.toString();
if(url == "about:blank") return;
if(doc.readyState === "loading" && firedLoadEvent < 120) {
// Try again in a second
diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js
@@ -402,14 +402,13 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) {
this.sandbox.DOMParser = function() {
var uri, principal;
// get URI
- // DEBUG: In Fx 4 we can just use document.nodePrincipal, but in Fx 3.6 this doesn't work
if(typeof sandboxLocation === "string") { // if sandbox specified by URI
- // if sandbox specified by URI, get codebase principal from security manager
var secMan = Services.scriptSecurityManager;
- principal = (secMan.getCodebasePrincipal || secMan.getSimpleCodebasePrincipal)
- (Services.io.newURI(sandboxLocation, "UTF-8", null));
+ uri = Services.io.newURI(sandboxLocation, "UTF-8", null);
+ principal = (secMan.getCodebasePrincipal || secMan.getSimpleCodebasePrincipal)(uri);
} else { // if sandbox specified by DOM document
- uri = sandboxLocation.document.nodePrincipal;
+ principal = sandboxLocation.document.nodePrincipal;
+ uri = sandboxLocation.document.documentURIObject;
}
// initialize DOM parser
@@ -419,13 +418,11 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) {
// expose parseFromString
this.__exposedProps__ = {"parseFromString":"r"};
- if(Zotero.isFx5) {
- this.parseFromString = function(str, contentType) {
- return Zotero.Translate.DOMWrapper.wrap(_DOMParser.parseFromString(str, contentType));
- }
+ this.parseFromString = function(str, contentType) {
+ return Zotero.Translate.SandboxManager.Fx5DOMWrapper(_DOMParser.parseFromString(str, contentType));
}
- }
- };
+ };
+ }
this.sandbox.DOMParser.__exposedProps__ = {"prototype":"r"};
this.sandbox.DOMParser.prototype = {};
this.sandbox.XMLSerializer = function() {
diff --git a/install.rdf b/install.rdf
@@ -24,8 +24,8 @@
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
- <em:minVersion>5</em:minVersion>
- <em:maxVersion>15.0a1</em:maxVersion>
+ <em:minVersion>5.0</em:minVersion>
+ <em:maxVersion>19.0a1</em:maxVersion>
</Description>
</em:targetApplication>
diff --git a/update.rdf b/update.rdf
@@ -11,8 +11,8 @@
<targetApplication>
<RDF:Description>
<id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id>
- <minVersion>5</minVersion>
- <maxVersion>15.0a1</maxVersion>
+ <minVersion>5.0</minVersion>
+ <maxVersion>19.0a1</maxVersion>
<updateLink>http://download.zotero.org/extension/zotero.xpi</updateLink>
<updateHash>sha1:</updateHash>
</RDF:Description>