diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index a03a1f6741..f992fb74e9 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -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()); + } } diff --git a/chrome/content/zotero/preferences.js b/chrome/content/zotero/preferences.js index d894a40db8..8051498771 100644 --- a/chrome/content/zotero/preferences.js +++ b/chrome/content/zotero/preferences.js @@ -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); } diff --git a/chrome/content/zotero/preferences.xul b/chrome/content/zotero/preferences.xul index f91af74a31..71ec5fd193 100644 --- a/chrome/content/zotero/preferences.xul +++ b/chrome/content/zotero/preferences.xul @@ -24,6 +24,7 @@ + @@ -48,6 +49,8 @@ + + diff --git a/chrome/locale/en-US/zotero/preferences.dtd b/chrome/locale/en-US/zotero/preferences.dtd index 57be02af05..7744709a79 100644 --- a/chrome/locale/en-US/zotero/preferences.dtd +++ b/chrome/locale/en-US/zotero/preferences.dtd @@ -6,6 +6,7 @@ + \ No newline at end of file diff --git a/defaults/preferences/zotero.js b/defaults/preferences/zotero.js index c74fccc15a..ffbde3ed2e 100644 --- a/defaults/preferences/zotero.js +++ b/defaults/preferences/zotero.js @@ -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); \ No newline at end of file