closes #305, add conditionals/quotes to CSL
addresses #327, Scrapers should either take snapshots or use URL field closes #309, Integration server prevents Zotero from loading in multiple instances of Firefox
This commit is contained in:
parent
5da77cf7ee
commit
03e9dc5ae5
File diff suppressed because it is too large
Load Diff
|
@ -16,11 +16,15 @@ Zotero.Integration = new function() {
|
||||||
serv = sock.createInstance();
|
serv = sock.createInstance();
|
||||||
serv = serv.QueryInterface(Components.interfaces.nsIServerSocket);
|
serv = serv.QueryInterface(Components.interfaces.nsIServerSocket);
|
||||||
|
|
||||||
|
try {
|
||||||
// bind to a random port on loopback only
|
// bind to a random port on loopback only
|
||||||
serv.init(50001, true, -1);
|
serv.init(50001, true, -1);
|
||||||
serv.asyncListen(Zotero.Integration.SocketListener);
|
serv.asyncListen(Zotero.Integration.SocketListener);
|
||||||
|
|
||||||
Zotero.debug("Integration HTTP server listening on 127.0.0.1:"+serv.port);
|
Zotero.debug("Integration HTTP server listening on 127.0.0.1:"+serv.port);
|
||||||
|
} catch(e) {
|
||||||
|
Zotero.debug("Not initializing integration HTTP");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1194,7 +1194,8 @@ Zotero.Translate.prototype._itemDone = function(item) {
|
||||||
(attachment.title ? attachment.title : attachment.document.title));
|
(attachment.title ? attachment.title : attachment.document.title));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(attachment.document) {
|
// links no longer exist, so just don't save them
|
||||||
|
/*if(attachment.document) {
|
||||||
attachmentID = Zotero.Attachments.linkFromURL(attachment.document.location.href, myID,
|
attachmentID = Zotero.Attachments.linkFromURL(attachment.document.location.href, myID,
|
||||||
(attachment.mimeType ? attachment.mimeType : attachment.document.contentType),
|
(attachment.mimeType ? attachment.mimeType : attachment.document.contentType),
|
||||||
(attachment.title ? attachment.title : attachment.document.title));
|
(attachment.title ? attachment.title : attachment.document.title));
|
||||||
|
@ -1206,7 +1207,7 @@ Zotero.Translate.prototype._itemDone = function(item) {
|
||||||
attachmentID = Zotero.Attachments.linkFromURL(attachment.url, myID,
|
attachmentID = Zotero.Attachments.linkFromURL(attachment.url, myID,
|
||||||
(attachment.mimeType ? attachment.mimeType : undefined),
|
(attachment.mimeType ? attachment.mimeType : undefined),
|
||||||
(attachment.title ? attachment.title : undefined));
|
(attachment.title ? attachment.title : undefined));
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
} else if(this.type == "import") {
|
} else if(this.type == "import") {
|
||||||
var attachmentItem = this._itemImportAttachment(attachment, myID);
|
var attachmentItem = this._itemImportAttachment(attachment, myID);
|
||||||
|
|
|
@ -763,7 +763,7 @@ Zotero.Date = new function(){
|
||||||
|
|
||||||
// get short month strings from CSL interpreter
|
// get short month strings from CSL interpreter
|
||||||
if(!months) {
|
if(!months) {
|
||||||
var months = Zotero.CSL.getMonthStrings("short");
|
var months = Zotero.CSL.Global.getMonthStrings("short");
|
||||||
}
|
}
|
||||||
if(!_monthRe) {
|
if(!_monthRe) {
|
||||||
// then, see if have anything resembling a month anywhere
|
// then, see if have anything resembling a month anywhere
|
||||||
|
@ -820,11 +820,11 @@ Zotero.Date = new function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!months) {
|
if(!months) {
|
||||||
var months = Zotero.CSL.getMonthStrings("short");
|
var months = Zotero.CSL.Global.getMonthStrings("short");
|
||||||
}
|
}
|
||||||
if(date.month != undefined && months[date.month]) {
|
if(date.month != undefined && months[date.month]) {
|
||||||
// get short month strings from CSL interpreter
|
// get short month strings from CSL interpreter
|
||||||
var months = Zotero.CSL.getMonthStrings("long");
|
var months = Zotero.CSL.Global.getMonthStrings("long");
|
||||||
string += months[date.month];
|
string += months[date.month];
|
||||||
if(date.day) {
|
if(date.day) {
|
||||||
string += " "+date.day+", ";
|
string += " "+date.day+", ";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user