Added automaticSnapshots pref, and changed Create New Item From Current Page button to obey pref
At least some scrapers (NYT and WashPo, for sure) should be updated to follow this pref Addresses #327, Scrapers should either take snapshots or use URL field
This commit is contained in:
parent
026b37169a
commit
088027d640
5 changed files with 18 additions and 1 deletions
|
@ -743,7 +743,13 @@ var ZoteroPane = new function()
|
|||
accessDate: "CURRENT_TIMESTAMP"
|
||||
}
|
||||
|
||||
newItem(Zotero.ItemTypes.getID('webpage'), data);
|
||||
var item = newItem(Zotero.ItemTypes.getID('webpage'), data);
|
||||
|
||||
// Automatically save snapshot if pref set
|
||||
if (item.getID() && Zotero.Prefs.get('automaticSnapshots'))
|
||||
{
|
||||
addAttachmentFromPage(false, item.getID());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
var autoUpdateBox;
|
||||
var positionMenu;
|
||||
var parseEndnoteBox;
|
||||
var automaticSnapshots;
|
||||
var openURLMenu;
|
||||
var openURLResolvers;
|
||||
var openURLServerField;
|
||||
|
@ -53,6 +54,9 @@ function init()
|
|||
parseEndnoteBox = document.getElementById('parseEndnoteBox');
|
||||
parseEndnoteBox.checked = Zotero.Prefs.get('parseEndNoteMIMETypes');
|
||||
|
||||
automaticSnapshots = document.getElementById('automaticSnapshots');
|
||||
automaticSnapshots.checked = Zotero.Prefs.get('automaticSnapshots');
|
||||
|
||||
openURLServerField = document.getElementById('openURLServerField');
|
||||
openURLServerField.value = Zotero.Prefs.get('openURL.resolver');
|
||||
openURLVersionMenu = document.getElementById('openURLVersionMenu');
|
||||
|
@ -80,6 +84,8 @@ function accept()
|
|||
Zotero.Ingester.MIMEHandler.init();
|
||||
}
|
||||
|
||||
Zotero.Prefs.set('automaticSnapshots', automaticSnapshots.checked);
|
||||
|
||||
Zotero.Prefs.set('openURL.resolver', openURLServerField.value);
|
||||
Zotero.Prefs.set('openURL.version', openURLVersionMenu.value);
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<!-- TODO: change to prefWindow? -->
|
||||
<dialog id="winMain" title="&zotero.preferences.title;" style="min-width:400px;"
|
||||
onload="init();" ondialogaccept="accept()"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
@ -48,6 +49,8 @@
|
|||
|
||||
<checkbox id="parseEndnoteBox" label="&zotero.preferences.parseEndnote.label;"/>
|
||||
|
||||
<checkbox id="automaticSnapshots" label="&zotero.preferences.automaticSnapshots.label;"/>
|
||||
|
||||
<groupbox>
|
||||
<caption label="&zotero.preferences.openurl.caption;"/>
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<!ENTITY zotero.preferences.position.below "below">
|
||||
<!ENTITY zotero.preferences.position.browser "browser content">
|
||||
<!ENTITY zotero.preferences.parseEndnote.label "Use Zotero for downloaded EndNote files">
|
||||
<!ENTITY zotero.preferences.automaticSnapshots.label "Automatically take snapshots when creating items from web pages">
|
||||
<!ENTITY zotero.preferences.openurl.caption "OpenURL">
|
||||
<!ENTITY zotero.preferences.openurl.server "Resolver:">
|
||||
<!ENTITY zotero.preferences.openurl.version "Version:">
|
|
@ -7,5 +7,6 @@ pref("extensions.zotero.zoteroPaneOnTop",false);
|
|||
pref("extensions.zotero.openURL.resolver","http://athene.gmu.edu:8888/lfp/LinkFinderPlus/Display");
|
||||
pref("extensions.zotero.openURL.version","0.1");
|
||||
pref("extensions.zotero.parseEndNoteMIMETypes",true);
|
||||
pref("extensions.zotero.automaticSnapshots",true);
|
||||
pref("extensions.zotero.downloadAssociatedFiles",false);
|
||||
pref("extensions.zotero.reportTranslationFailure",true);
|
Loading…
Reference in a new issue