![fletcherhaz](/assets/img/avatar_default.png)
Our SingleFileZ integration would save images inside directories following the SingleFileZ format. However, Zotero does not support syncing sub-directories of attachments. This commit switch back to a single HTML file with base64 encoded resources. We think that the 33% increase in resources will be offset by the compression of HTML and removal of JavaScript and unused CSS. This commit does not fix past snapshots that were saved using SingleFileZ.
88 lines
2.7 KiB
JavaScript
88 lines
2.7 KiB
JavaScript
/*
|
|
***** BEGIN LICENSE BLOCK *****
|
|
|
|
Copyright © 2020 Corporation for Digital Scholarship
|
|
Vienna, Virginia, USA
|
|
https://www.zotero.org
|
|
|
|
This file is part of Zotero.
|
|
|
|
Zotero is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
Zotero is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
***** END LICENSE BLOCK *****
|
|
*/
|
|
|
|
Zotero.SingleFile = {
|
|
// These are defaults from SingleFile
|
|
// Located in: zotero/resources/SingleFile/extension/core/bg/config.js
|
|
CONFIG: {
|
|
removeHiddenElements: true,
|
|
removeUnusedStyles: true,
|
|
removeUnusedFonts: true,
|
|
removeFrames: true,
|
|
removeImports: true,
|
|
removeScripts: true,
|
|
compressHTML: true,
|
|
compressCSS: false,
|
|
loadDeferredImages: true,
|
|
loadDeferredImagesMaxIdleTime: 1500,
|
|
loadDeferredImagesBlockCookies: false,
|
|
loadDeferredImagesBlockStorage: false,
|
|
loadDeferredImagesKeepZoomLevel: false,
|
|
filenameTemplate: "{page-title} ({date-iso} {time-locale}).html",
|
|
infobarTemplate: "",
|
|
includeInfobar: false,
|
|
confirmInfobarContent: false,
|
|
autoClose: false,
|
|
confirmFilename: false,
|
|
filenameConflictAction: "uniquify",
|
|
filenameMaxLength: 192,
|
|
filenameReplacedCharacters: ["~", "+", "\\\\", "?", "%", "*", ":", "|", "\"", "<", ">", "\x00-\x1f", "\x7F"],
|
|
filenameReplacementCharacter: "_",
|
|
contextMenuEnabled: true,
|
|
tabMenuEnabled: true,
|
|
browserActionMenuEnabled: true,
|
|
shadowEnabled: true,
|
|
logsEnabled: true,
|
|
progressBarEnabled: true,
|
|
maxResourceSizeEnabled: false,
|
|
maxResourceSize: 10,
|
|
removeAudioSrc: true,
|
|
removeVideoSrc: true,
|
|
displayInfobar: true,
|
|
displayStats: false,
|
|
backgroundSave: true,
|
|
autoSaveDelay: 1,
|
|
autoSaveLoad: false,
|
|
autoSaveUnload: false,
|
|
autoSaveLoadOrUnload: true,
|
|
autoSaveRepeat: false,
|
|
autoSaveRepeatDelay: 10,
|
|
removeAlternativeFonts: true,
|
|
removeAlternativeMedias: true,
|
|
removeAlternativeImages: true,
|
|
saveRawPage: false,
|
|
saveToGDrive: false,
|
|
forceWebAuthFlow: false,
|
|
extractAuthCode: true,
|
|
insertTextBody: true,
|
|
resolveFragmentIdentifierURLs: false,
|
|
userScriptEnabled: true,
|
|
saveCreatedBookmarks: false,
|
|
ignoredBookmarkFolders: [],
|
|
replaceBookmarkURL: true,
|
|
saveFavicon: true,
|
|
includeBOM: false
|
|
}
|
|
};
|