Merge branch '3.0'
Conflicts: chrome/content/zotero/xpcom/translation/translate_firefox.js install.rdf update.rdf
This commit is contained in:
commit
1bc98edba4
6 changed files with 16 additions and 30 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 36d26a584ac869f2dfbdd528f57141a3bbcf016f
|
||||
Subproject commit 92270bbba9fb59a57042003a7637afc8e694a94f
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue