commit 9a96c5411860ebc687b054aaf98e2ee4881ca776
parent 76b7adaa05e46e5a58a241ff56fdacb853300bd0
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 5 Oct 2006 09:44:41 +0000
Addresses #327, Scrapers should either take snapshots or use URL field
Use automaticSnapshots pref (which defaults to on and is changeable in the prefs window) rather than downloadAssociatedFiles (which defaults to off and is only settable through about:config at the moment) for now in translate.js
downloadAssociatedFiles should eventually be used for PDFs and other large files, whereas automaticSnapshots will be for HTML and the like -- in the meantime, I think it's OK for scrapers to just follow the visible pref for both, since otherwise they'd be totally confused when the NIFP button took a snapshot and the scrapers didn't
Simon, if there's any problem I'm not aware of with switching this for now (other than people getting some large PDFs on JStor), let me know.
Diffstat:
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/translate.js b/chrome/content/zotero/xpcom/translate.js
@@ -954,7 +954,11 @@ Zotero.Translate.prototype._generateErrorString = function(error) {
errorString += "\nurl => "+this.path
+ "\nextensions.zotero.cacheTranslatorData => "+Zotero.Prefs.get("cacheTranslatorData")
- + "\nextensions.zotero.downloadAssociatedFiles => "+Zotero.Prefs.get("downloadAssociatedFiles");
+ // TODO: Currently using automaticSnapshots pref for everything
+ // Eventually downloadAssociatedFiles may be a separate pref
+ // for PDFs and other large files
+ //+ "\nextensions.zotero.downloadAssociatedFiles => "+Zotero.Prefs.get("downloadAssociatedFiles");
+ + "\nextensions.zotero.automaticSnapshots => "+Zotero.Prefs.get("automaticSnapshots");
return errorString.substr(1);
}
@@ -1360,7 +1364,9 @@ Zotero.Translate.prototype._runHandler = function(type, argument) {
* does the actual web translation
*/
Zotero.Translate.prototype._web = function() {
- this._downloadAssociatedFiles = Zotero.Prefs.get("downloadAssociatedFiles");
+ // TODO: Currently using automaticSnapshots for everything
+ //this._downloadAssociatedFiles = Zotero.Prefs.get("downloadAssociatedFiles");
+ this._downloadAssociatedFiles = Zotero.Prefs.get("automaticSnapshots");
try {
this._sandbox.doWeb(this.document, this.location);