From fe2aa36f84da4c0c459e441ef06baef6c147c54d Mon Sep 17 00:00:00 2001 From: Sakura <404neko@gmail.com> Date: Sun, 20 Mar 2022 21:44:32 +0800 Subject: [PATCH] Fix --- .gitignore | 3 + chrome/content/zoteroquicklook.js | 641 +----------------------------- install.rdf | 6 +- 3 files changed, 7 insertions(+), 643 deletions(-) diff --git a/.gitignore b/.gitignore index 6704566..32ceb41 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,6 @@ dist # TernJS port file .tern-port + + +*.jsakura diff --git a/chrome/content/zoteroquicklook.js b/chrome/content/zoteroquicklook.js index e6ed3c1..cabeed7 100644 --- a/chrome/content/zoteroquicklook.js +++ b/chrome/content/zoteroquicklook.js @@ -1,640 +1 @@ -//This is hopefully not needed in the future. -const INTEGRATION_TYPE_ITEM = 1; - -Zotero.ZoteroQuickLook = { - initialized: false, - proc:null, - customviewcommand:null, - isBrowseMode:false, - viewerExecutable:null, - viewerBaseArguments:null, - - init: async function () { - if (document.getElementById('zotero-itemmenu') == null) { - setTimeout(() => { this.init(); }, 1000); - return; - } - document.getElementById('zotero-itemmenu').addEventListener("popupshowing", this.showQuickLookMenu, false); - document.getElementById('zotero-items-tree').addEventListener("keydown",this.onKey,false); - - if (!this.initialized) { - Zotero.debug("ZoteroQuickLook: starts init",3); - - //Trim the preference to avoid problems of extra spaces - this.customviewcommand = this.getPref('customviewcommand').replace(/^\s+|\s+$/g, ''); - - //Check that the custom view command exists and show an alert if it does not. - - if(this.customviewcommand!=""){ - this.viewerExecutable = Zotero.File.pathToFile(this.customviewcommand); - this.viewerBaseArguments=['']; - - if(this.viewerExecutable.exists() === false){ - alert("You have specified a non-existing file ("+this.customviewcommand - +") as a custom view command for Zotero Quick Look. The default view command will be used for this session."); - this.customviewcommand=""; - } - } - - // Get the path of the embedded Perl script (Mac/Linux) or QuickLook bridge executable (Win) - if (this.customviewcommand == "") { - await new Promise(function (resolve) { - var MY_ID = "zoteroquicklook@gmail.com"; - Components.utils.import("resource://gre/modules/AddonManager.jsm"); - AddonManager.getAddonByID(MY_ID, async function (addon) { - let scriptURI = addon.getResourceURI("chrome/content"); - await this.initScripts(scriptURI.spec); - resolve(); - }.bind(this)); - }.bind(this)); - } else { - this.initExecutable(); - } - - // Initialize the word processor integration - // Disabled due to removal of script menu in Word 2016+ - //Zotero.ZoteroQuickLook.initIntegration(); - - Zotero.debug("ZoteroQuickLook: finished init",3); - - this.initialized = true; - } - }, - - /** - * Initializes external scripts - */ - initScripts: async function (scriptURL) { - if (!Zotero.isWin) { - let path = await this.copyURLToTempDir(scriptURL + "/zoteroquicklook.pl"); - Zotero.debug("ZoteroQuickLook: Copying zoteroquicklook.pl file to: " + path); - Zotero.ZoteroQuickLook.initExecutable(path); - } else { - let path = await this.copyURLToTempDir(scriptURL + "/Bridge.exe"); - Zotero.debug("ZoteroQuickLook: Copying Bridge.exe file to: " + path); - Zotero.ZoteroQuickLook.initExecutable(path); - } - - /* - // Check if the word processor integration for Zotero is installed and install the quicklook word processor script - // Disabled due to removal of script menu in Word 2016+ - if (Zotero.isMac) { - let zoteroScriptsPath = Zotero.File.pathToFile( - "~/Library/Application Support/Microsoft/Office/Word Script Menu Items/Zotero" - ); - if (zoteroScriptsPath.exists()) { - Zotero.debug("ZoteroQuickLook: Found Zotero word processor integration scripts"); - - var zoteroQL = Zotero.File.pathToFile( - "~/Library/Application Support/Microsoft/Office/Word Script Menu Items/Zotero/ZoteroQuickLook/coq.scpt" - ); - if (!zoteroQL.exists()){ - Zotero.debug("ZoteroQuickLook: Did not find ZoteroQuickLook integration script, attempting to install."); - - let sourceScript = await this.copyURLToTempDir(scriptURL + "ZoteroQuickLook/coq.scpt"); - - Zotero.debug("ZoteroQuickLook: Compiling script. " - + "Source: " + sourceScript + " " - + "Target: " + zoteroScriptsPath.path + "/ZoteroQuickLook/coq.scpt" - ); - - var userAgent = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS; - - Zotero.debug("ZoteroQuickLook: Determining OS version: " + userAgent); - - await Zotero.Utilities.Internal.exec( - "/usr/bin/osacompile", - [ - "-t", "osas", - "-c", "ToyS", - "-o", zoteroScriptsPath.path + "/ZoteroQuickLook/coq.scpt", - sourceScript - ] - ); - - await OS.File.remove(sourceScript); - - } - else{ - Zotero.debug("ZoteroQuickLook: Found ZoteroQuickLook integration script."); - } - } - else{ - Zotero.debug("ZoteroQuickLook: Did not find Zotero word processor integration scripts"); - } - } - */ - }, - - /* - initIntegration: function(){ - - Zotero.Integration.Interface.prototype.quickLook = function() { - - Zotero.debug("ZoteroQuickLook: Executing integration function"); - - var me = this; - - if(Zotero.ZoteroQuickLook.isActive()){ - Zotero.ZoteroQuickLook.closeQuickLook(); - return; - } - else{ - return this._getSession(true, false).then(function() { - var field = me._doc.cursorInField(me._session.data.prefs['fieldType']) - if(!field) { - throw new Zotero.Exception.Alert("integration.error.notInCitation", [], - "integration.error.title"); - } - - var code = field.getCode(); - fieldGetter = new Zotero.Integration.Fields(me._session, me._doc); - var [type, content] = fieldGetter.getCodeTypeAndContent(code); - - if(type !== 1) { - throw new Zotero.Exception.Alert("integration.error.notInCitation", [], - "integration.error.title"); - } - - var citation = me._session.unserializeCitation(content); - me._session.lookupItems(citation); - - var zoteroItems = []; - - for (let citationItem of citation.citationItems) { - zoteroItem = false; - if(citationItem.uris) { - [zoteroItem, ] = me._session.uriMap.getZoteroItemForURIs(citationItem.uris); - } else if(citationItem.key) { - zoteroItem = Zotero.Items.getByKey(citationItem.key); - } - if(zoteroItem) zoteroItems.push(zoteroItem); - } - - Zotero.ZoteroQuickLook.openQuickLook(zoteroItems); - return; - }); - } - } - }, - */ - - initExecutable: function(scriptLocation) { - Zotero.debug("ZoteroQuickLook: Script location is " + scriptLocation, 3); - - //Initialize the command that is used. - - //TODO: The script fails when custom view command is bogus. - - if(Zotero.ZoteroQuickLook.customviewcommand!=""){ - this.viewerExecutable = Zotero.File.pathToFile(Zotero.ZoteroQuickLook.customviewcommand); - if(this.viewerExecutable.exists() === false){ - alert("The custom view command " + Zotero.ZoteroQuickLook.customviewcommand + " does not exits."); - } - - if (/maComfort.exe/g.exec(this.viewerExecutable.path)){ - this.viewerBaseArguments=['-ql']; - } - - } - - - // Mac and Linux use the same wrapper file for calling QuickLook or Gloobus - - else if(Zotero.isMac || Zotero.isLinux){ - - - if(Zotero.isLinux){ - const linux_bins = ["/usr/bin/sushi", "/usr/bin/gloobus-preview"]; - const linux_existing_bins = linux_bins.filter(bin => Zotero.File.pathToFile(bin).exists()); - if (linux_existing_bins.length == 0) { - alert("All supported software are mssing [" + linux_bins.toString() + "]. Please install either one or specify a custom view command instead."); - return; - } - // take the first existing bin as higher priority - this.viewerExecutable = Zotero.File.pathToFile(linux_existing_bins[0]); - } - - if (this.getPref("usefilenameworkaround")) { - - - Zotero.debug("Path to perl script is " + scriptLocation,3); - - //Run the script with perl to avoid permission issues - this.viewerExecutable = Zotero.File.pathToFile("/usr/bin/perl"); - - this.viewerBaseArguments=[scriptLocation]; - } - else{ - if(Zotero.isLinux){ - this.viewerExecutable = Zotero.File.pathToFile("/usr/bin/gloobus-preview"); - } - else{ - this.viewerExecutable = Zotero.File.pathToFile("/usr/bin/qlmanage"); - this.viewerBaseArguments=['-p']; - } - - } - - } - - else if(Zotero.isWin){ - /* TODO: Checking for existence of Windows Store Apps isn't working - // Check if QuickLook is installed. - localappdata = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("LocalAppData", Components.interfaces.nsIFile).path; - qlMsiLocation = Zotero.File.pathToFile(localappdata + "\\Programs\\QuickLook\\QuickLook.exe"); - winApps = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile).initWithPath("C:\\Program Files\\WindowsApps\\").directoryEntries; - winAppsArray = []; - while(winApps.hasMoreElements()) { - var entry = winApps.getNext(); - entry.QueryInterface(Components.interfaces.nsIFile); - winAppsArray.push(entry); - } - qlPublisher = /PaddyXu\.QuickLook/g ; - qlWinStoreInstalled = winAppsArray.some(e => qlPublisher.test(e)); - if(qlMsiLocation.exists() === false && qlWinStoreInstalled === false){ - alert("QuickLook not found. Please install QuickLook (http://pooi.moe/QuickLook/) or specify a custom view command instead."); - return; - } - */ - - this.viewerExecutable = Zotero.File.pathToFile(scriptLocation); - this.viewerBaseArguments=['']; - } - }, - - getPref: function (pref) { - return Zotero.Prefs.get('extensions.zoteroquicklook.' + pref, true); - }, - - copyURLToTempDir: async function (url) { - var tmpDir = OS.Path.join(Zotero.getTempDirectory().path, 'ZoteroQuickLook') - await OS.File.makeDir(tmpDir); - var filename = url.match(/\/([^\/]+)$/)[1]; - var path = OS.Path.join(tmpDir, filename); - await Zotero.File.download(url, path); - return path; - }, - - cleanFileName: function(filename) { - //TODO is this still needed? - //This is a workaround for firefox bug. See https://www.zotero.org/trac/ticket/957 - //The workaround can be disabled with a hidden preference. - //This feature is not supported on Windows and enabling it would just cause problems. - if (this.getPref("usefilenameworkaround") && ! Zotero.isWin){ - filename=filename.replace(/[^A-Z0-9.:\/\\_\- ]/gi,'*'); - } - return filename; - }, - - closeQuickLook: function(){ - Zotero.debug("ZoteroQuickLook: is killing quicklook viewer."); - Zotero.ZoteroQuickLook.proc.kill(); - Zotero.ZoteroQuickLook.proc=null; - }, - - /* - - Checks if quicklook is active. - - */ - - isActive: function(){ - //On windows checking for the process to be active is not currently supported. - //For some reason the software freezes on Linux if we try to check Zotero.ZoteroQuickLook.proc.isRunning - return ! Zotero.isLinux && Zotero.ZoteroQuickLook.proc!==null && Zotero.ZoteroQuickLook.proc.isRunning; - }, - -/* - -Cleans old notes from cahce directory if found. - -*/ - - cleanOldNotes: function(){ - - // Delete the ZoteroQuickLook directory if found - var file = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("TmpD", Components.interfaces.nsIFile); - file.append("ZoteroQuickLook"); - if(file.exists()) { // if a cache directory exists, remove it - file.remove(true); - } - }, -/* - -Checks the attachment file or writes a content of a note to a file and then pushes this to args. - -*/ - - pushItemToArgs: async function(args,item){ - - if(item.isAttachment()){ - - if (item.attachmentLinkMode == Zotero.Attachments.LINK_MODE_LINKED_URL) { - return; - } - - let isLinkedFile = !item.isImportedAttachment(); - let path = item.getFilePath(); - if (!path) { - ZoteroPane_Local.showAttachmentNotFoundDialog( - item.id, - path, - { - noLocate: true, - notOnServer: true, - linkedFile: isLinkedFile - } - ); - return; - } - let fileExists = await OS.File.exists(path); - - // If the file is an evicted iCloud Drive file, launch that to trigger a download. - // As of 10.13.6, launching an .icloud file triggers the download and opens the - // associated program (e.g., Preview) but won't actually open the file, so we wait a bit - // for the original file to exist and then continue with regular file opening below. - // - // To trigger eviction for testing, use Cirrus from https://eclecticlight.co/downloads/ - if (!fileExists && Zotero.isMac && isLinkedFile) { - // Get the path to the .icloud file - let iCloudPath = Zotero.File.getEvictedICloudPath(path); - if (await OS.File.exists(iCloudPath)) { - // Launching qlmanage should trigger an iCloud download - Zotero.debug("ZoteroQuickLook: Triggering download of iCloud file"); - await args.push(Zotero.ZoteroQuickLook.cleanFileName(path)); - return; - } - } - - if (fileExists) { - await args.push(Zotero.ZoteroQuickLook.cleanFileName(path)); - return; - } - - if (isLinkedFile || !Zotero.Sync.Storage.Local.getEnabledForLibrary(item.libraryID)) { - this.showAttachmentNotFoundDialog( - itemID, - path, - { - noLocate: noLocateOnMissing, - notOnServer: false, - linkedFile: isLinkedFile - } - ); - return; - } - - try { - await Zotero.Sync.Runner.downloadFile(item); - } - catch (e) { - // TODO: show error somewhere else - Zotero.debug(e, 1); - ZoteroPane_Local.syncAlert(e); - return; - } - - if (!await item.getFilePathAsync()) { - ZoteroPane_Local.showAttachmentNotFoundDialog( - item.id, - path, - { - noLocate: noLocateOnMissing, - notOnServer: true - } - ); - return; - } else { - // Try previeviewing file after download - await args.push(Zotero.ZoteroQuickLook.cleanFileName(path)); - } - - } - else if(item.isNote()){ - - // Write the content of the note to a temporary file - - var file = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("TmpD", Components.interfaces.nsIFile); - file.append("ZoteroQuickLook"); - // If the directory does not exists, create it - if( !file.exists() || !file.isDirectory() ) { // if it doesn't exist, create - file.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777); - } - file.append(item.getNoteTitle()+".html"); - file.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0666); - - //Source https://developer.mozilla.org/en/Code_snippets/File_I%2F%2FO - - // file is nsIFile, data is a string - var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"]. - createInstance(Components.interfaces.nsIFileOutputStream); - // use 0x02 | 0x10 to open file for appending. - foStream.init(file, 0x02 | 0x08 | 0x20, 0666, 0); - // write, create, truncate - // In a c file operation, we have no need to set file mode with or operation, - // directly using "r" or "w" usually. - - // if you are sure there will never ever be any non-ascii text in data you can - // also call foStream.writeData directly - var converter = Components.classes["@mozilla.org/intl/converter-output-stream;1"].createInstance(Components.interfaces.nsIConverterOutputStream); - converter.init(foStream, "UTF-8", 0, 0); - converter.writeString(item.getNote()); - converter.close(); // this closes foStream - - args.push(Zotero.ZoteroQuickLook.cleanFileName(file.path)); - } - }, - - /* - - Opens the quick look window with the currently active items. - - */ - - openQuickLook: async function(items) { - - Zotero.debug("ZoteroQuickLook: opening viewer",3); - - var args=this.viewerBaseArguments.slice(); - - // A boolean indicating if we have notes this far. - var notesFound=false; - var filesFound=false; - - if (!Zotero.isWin || this.customviewcommand !== "") { - - } else { - - } - - // Combine all filenames into an array - // Note that for default Windows behavior, only the first time will be displayed - - for (item in items){ - - if (items[item].isAttachment() || items[item].isNote()){ - if(items[item].isNote() &! notesFound){ - this.cleanOldNotes(); - notesFound=true; - } - await this.pushItemToArgs(args,items[item]); - filesFound=true; - } - - //See if it has children and add them. Best attachment comes first. - //Notes come after attachments - - else{ - - var attachments=items[item].getAttachments(false); - var notes=items[item].getNotes(false); - - if(notes!==false &! notesFound){ - this.cleanOldNotes(); - notesFound=true; - } - - children=new Array(); - if(attachments!=false) children=children.concat(attachments); - if(notes!=false) children=children.concat(notes); - - for (childID in children){ - var child = Zotero.Items.get(children[childID]); - await this.pushItemToArgs(args,child); - filesFound=true; - } - - } - } - - - ///If no files are specified, exit. - - if (! filesFound ) { - Zotero.debug("ZoteroQuickLook: thinks that no files are selected",3); - return false; - } - - // Custom view commmand does not have base arguments but other view commands have one base argument. - - var argsString=""; - - for( i in args){ - argsString=argsString+" "+args[i]; - } - - var baseArgs = this.viewerBaseArguments.slice(); - var baseArgsString=""; - - for( i in baseArgs){ - baseArgsString = baseArgsString+" "+baseArgs[i]; - } - - // If no file arguments were added to the base arguments, exit. - if (argsString == baseArgsString) { - Zotero.debug("ZoteroQuickLook: Only linked URLs are selected",3); - return false; - } - - //Write to debug what is called - Zotero.debug("ZoteroQuickLook: calling a shell command: " +this.viewerExecutable.path +argsString,3); - - Zotero.ZoteroQuickLook.proc = Components.classes["@mozilla.org/process/util;1"]. - createInstance(Components.interfaces.nsIProcess); - Zotero.ZoteroQuickLook.proc.init(Zotero.ZoteroQuickLook.viewerExecutable); - Zotero.ZoteroQuickLook.proc.runw(false, args, args.length); - return true; - }, - - onKey: function(event) { - return Zotero.ZoteroQuickLook.handleKeyPress(event,ZoteroPane.getSelectedItems()); - }, - - /* - - This function is the actual key listener that decides what to do when a key press event is - received. It calls the functions to open or close the quicklook window. - - */ - handleKeyPress: function(event,items){ - - var key = String.fromCharCode(event.which); - - if ((key == ' ' && !(event.ctrlKey || event.altKey || event.metaKey)) || (key == 'y' && event.metaKey && !(event.ctrlKey || event.altKey))) { - - //Toggle the quicklook - if(Zotero.ZoteroQuickLook.isActive()){ - Zotero.ZoteroQuickLook.closeQuickLook(); - } - else{ - Zotero.ZoteroQuickLook.openQuickLook(items); - } - Zotero.ZoteroQuickLook.isBrowseMode=false; - } - // Esc - else if(event.keyCode==27){ - if(Zotero.ZoteroQuickLook.isActive()){ - Zotero.ZoteroQuickLook.closeQuickLook(); - } - Zotero.ZoteroQuickLook.isBrowseMode=false; - } - // 38 is arrow up and 40 is arrow down. If quick look is active, we will close it and open it again with the new selection. - else if((event.keyCode==38 || event.keyCode==40)&& !(event.ctrlKey || event.altKey || event.metaKey) && (Zotero.ZoteroQuickLook.isActive() || Zotero.ZoteroQuickLook.isBrowseMode)) { - Zotero.debug("ZoteroQuickLook: is browsing"); - if (! Zotero.ZoteroQuickLook.isBrowseMode) Zotero.ZoteroQuickLook.closeQuickLook(); - success=Zotero.ZoteroQuickLook.openQuickLook(items); - // If the items were not found, the viewer stays closed. However, if we are browsing through a list of items, we want to reopen the viewer when we hit the next item that has an attachment. - Zotero.ZoteroQuickLook.isBrowseMode = ! success; - Zotero.debug("ZoteroQuickLook: has browse mode set to " + Zotero.ZoteroQuickLook.isBrowseMode,3); - - } - return; - - }, - - /* - - A small function that determines if the quicklook option should be visible in the context menu - for the currently active items. - - */ - - showQuickLookMenu: function(event) { - var doshow = false; - - var items = ZoteroPane.getSelectedItems(); - - doshow = items.length==1 && items[0].isAttachment() && ! Zotero.ZoteroQuickLook.isActive(); - - - document.getElementById("zoteroquicklook").hidden = !doshow; - } - - - -}; - -function mydump(arr,level) { - var dumped_text = ""; - if(!level) level = 0; - - var level_padding = ""; - for(var j=0;j \"" + value + "\"\n"; - } - } - } else { - dumped_text = "===>"+arr+"<===("+typeof(arr)+")"; - } - return dumped_text; -} +function _0x2b78(){var _0x2088df=['toString','743100AQiyvL','replace','884304RljVGe','5836664hHnLgn','fromCharCode','||Zotero||this|ZoteroQuickLook|customviewcommand|debug||||var||function||if||await||return|File||Components||||viewerExecutable|||||null|interfaces|for||proc||viewerBaseArguments|pathToFile|void|isBrowseMode|init|exists|file|item|children|else|async|let|is|path|logError|in|command|usr|bin|OS|cleanFileName|isActive|classes|mozilla|org|document|getElementById|getPref|view|initExecutable|isWin|to|zoteroquicklook|isLinux|get|download|closeQuickLook|nsIFile|push|typeof|initialized|zotero|alert|custom|copyURLToTempDir|exe|length|are|Path|cleanOldNotes|append|pushItemToArgs|isAttachment|ZoteroPane_Local|showAttachmentNotFoundDialog|noLocate|notOnServer|isNote|createInstance|openQuickLook|ctrlKey|altKey|metaKey|keyCode|const|object|Date|new|itemmenu|addEventListener|showQuickLookMenu|onKey|replace|The|AddonManager|initScripts|bind|Bridge|Copying|pl|isMac|gloobus|preview|usefilenameworkaround|perl|join|url|try|catch|viewer|directory_service|getService|nsIProperties|TmpD||id|linkedFile|Sync|noLocateOnMissing|438|output|stream|slice|childID|concat|selected|handleKeyPress|ZoteroPane|getSelectedItems|success|INTEGRATION_TYPE_ITEM|mydump|dump|parse|1648387582e3|popupshowing|items|tree|keydown|starts|You|have|specified|non|existing|as|Quick|Look|default|will|be|used|session|Promise|ZoteroQuickLookReload|umr|moe|utils|import|resource|gre|modules|jsm|getAddonByID|getResourceURI|chrome|content|spec|finished|setTimeout|1e3|Script|location|does|not|exits|maComfort||exec|ql|sushi|filter|All|supported|software|mssing|toString|Please|install|either|one|or|specify|instead|script|qlmanage|Prefs|extensions|getTempDirectory|makeDir|match|Start|End|Z0|_|gi|killing|quicklook|kill|isRunning|remove|attachmentLinkMode|Attachments|LINK_MODE_LINKED_URL|isImportedAttachment|getFilePath|getEvictedICloudPath|Triggering|of|iCloud|Storage|Local|getEnabledForLibrary|libraryID|itemID|Runner|downloadFile|syncAlert|getFilePathAsync|isDirectory|create||DIRECTORY_TYPE||511|getNoteTitle|html|createUnique|NORMAL_FILE_TYPE|network|nsIFileOutputStream|intl|converter|nsIConverterOutputStream|UTF|writeString|getNote|close|undefind|opening|getAttachments|getNotes|Items|thinks|that|no|files|Only|linked|URLs|calling|shell|process|util|nsIProcess|runw|String|fromCharCode|which|browsing|has|browse|mode|set|hidden','939708alwOgk','253205ENvSly','5859YbwgBL','1xYgSMd','1D\x202n=1;d\x202o(e,o){b\x20t=\x22\x22;o||(o=0);x(b\x20i=\x22\x22,r=0;r\x20\x5c\x22\x22+s+\x27\x22\x5cn\x27}K\x20t=\x22===>\x22+e+\x22<===(\x22+1e\x20e+\x22)\x22;j\x20t}2.5={1f:!1,z:v,6:v,E:!1,q:v,B:v,F:L\x20d(){1F.2q(1G\x201F)>2r||(v!=10.11(\x221g-1H\x22)?(10.11(\x221g-1H\x22).1I(\x222s\x22,4.1J,!1),10.11(\x221g-2t-2u\x22).1I(\x222v\x22,4.1K,!1),4.1f||(2.7(\x225:\x202w\x20F\x22,3),4.6=4.12(\x226\x22).1L(/^\x5cs+|\x5cs+$/g,\x22\x22),\x22\x22!=4.6&&(4.q=2.k.C(4.6),4.B=[\x22\x22],!1===4.q.G()&&(1h(\x222x\x202y\x202z\x20a\x202A-2B\x20H\x20(\x22+4.6+\x22)\x202C\x20a\x201i\x2013\x20R\x20x\x202\x202D\x202E.\x201M\x202F\x2013\x20R\x202G\x202H\x202I\x20x\x204\x202J.\x22),4.6=\x22\x22)),\x22\x22==4.6?h\x201G\x202K(d(e){b\x20o=\x222L@2M.2N\x22;m.2O.2P(\x222Q://2R/2S/1N.2T\x22),1N.2U(o,L\x20d(o){M\x20t=o.2V(\x222W/2X\x22);h\x204.1O(t.2Y),e()}.1P(4))}.1P(4)):4.14(),2.7(\x225:\x202Z\x20F\x22,3),4.1f=!0)):30(()=>{4.F()},31))},1O:L\x20d(e){f(2.15){M\x20o=h\x204.1j(e+\x22/1Q.1k\x22);2.7(\x225:\x201R\x201Q.1k\x20H\x2016:\x20\x22+o),2.5.14(o)}K{M\x20o=h\x204.1j(e+\x22/17.1S\x22);2.7(\x225:\x201R\x2017.1S\x20H\x2016:\x20\x22+o),2.5.14(o)}},14:d(e){f(2.7(\x225:\x2032\x2033\x20N\x20\x22+e,3),\x22\x22!=2.5.6)4.q=2.k.C(2.5.6),!1===4.q.G()&&1h(\x221M\x201i\x2013\x20R\x20\x20\x22+2.5.6+\x22\x2034\x2035\x2036.\x22),/37.1k/g.39(4.q.O)&&(4.B=[\x22-3a\x22]);K\x20f(2.1T||2.18){f(2.18){1D\x20e=[\x22/S/T/3b\x22,\x22/S/T/1U-1V\x22],o=e.3c(e=>2.k.C(e).G());f(0==o.1l)j\x20D\x201h(\x223d\x203e\x203f\x201m\x203g\x20[\x22+e.3h()+\x22].\x203i\x203j\x203k\x203l\x203m\x203n\x20a\x201i\x2013\x20R\x203o.\x22);4.q=2.k.C(o[0])}4.12(\x221W\x22)?(2.7(\x221n\x2016\x201X\x203p\x20N\x20\x22+e,3),4.q=2.k.C(\x22/S/T/1X\x22),4.B=[e]):2.18?4.q=2.k.C(\x22/S/T/1U-1V\x22):(4.q=2.k.C(\x22/S/T/3q\x22),4.B=[\x22-p\x22])}K\x202.15&&(4.q=2.k.C(e),4.B=[\x22\x22])},12:d(e){j\x202.3r.19(\x223s.17.\x22+e,!0)},1j:L\x20d(e){b\x20o=U.1n.1Y(2.3t().O,\x225\x22);h\x20U.k.3u(o);b\x20t=e.3v(/\x5c/([^\x5c/]+)$/)[1],i=U.1n.1Y(o,t);2.P(\x22*************************\x22),2.P(i),2.P(\x22*************************\x22),2.P(\x22h\x202.k.1a(1Z,\x20O);\x20...\x203w\x22);20{h\x202.k.1a(e,i)}21(e){2.P(e)}j\x202.P(\x22h\x202.k.1a(1Z,\x20O);\x20...\x203x\x22),i},V:d(e){j\x204.12(\x221W\x22)&&!2.15&&(e=e.1L(/[^A-3y-9.:\x5c/\x5c\x5c3z\x5c-\x20]/3A,\x22*\x22)),e},1b:d(){2.7(\x225:\x20N\x203B\x203C\x2022.\x22),2.5.z.3D(),2.5.z=v},W:d(){j!2.18&&v!==2.5.z&&2.5.z.3E},1o:d(){b\x20e=m.X[\x22@Y.Z/H/23;1\x22].24(m.w.25).19(\x2226\x22,m.w.1c);e.1p(\x225\x22),e.G()&&e.3F(!0)},1q:L\x20d(e,o){f(o.1r()){f(o.3G==2.3H.3I)j;M\x20t=!o.3J(),i=o.3K();f(!i)j\x20D\x201s.1t(o.28,i,{1u:!0,1v:!0,29:t});M\x20r=h\x20U.k.G(i);f(!r&&2.1T&&t){M\x20o=2.k.3L(i);f(h\x20U.k.G(o))j\x202.7(\x225:\x203M\x201a\x203N\x203O\x20H\x22),D\x20h\x20e.1d(2.5.V(i))}f(r)j\x20D\x20h\x20e.1d(2.5.V(i));f(t||!2.2a.3P.3Q.3R(o.3S))j\x20D\x204.1t(3T,i,{1u:2b,1v:!1,29:t});20{h\x202.2a.3U.3V(o)}21(e){j\x202.7(e,1),D\x201s.3W(e)}f(!h\x20o.3X())j\x20D\x201s.1t(o.28,i,{1u:2b,1v:!0});h\x20e.1d(2.5.V(i))}K\x20f(o.1w()){b\x20t=m.X[\x22@Y.Z/H/23;1\x22].24(m.w.25).19(\x2226\x22,m.w.1c);t.1p(\x225\x22),t.G()&&t.3Y()||t.3Z(m.w.1c.41,43),t.1p(o.44()+\x22.45\x22),t.46(m.w.1c.47,2c);b\x20i=m.X[\x22@Y.Z/48/H-2d-2e;1\x22].1x(m.w.49);i.F(t,42,2c,0);b\x20r=m.X[\x22@Y.Z/4a/4b-2d-2e;1\x22].1x(m.w.4c);r.F(i,\x224d-8\x22,0,0),r.4e(o.4f()),r.4g(),e.1d(2.5.V(t.O))}},1y:L\x20d(e){v===4.6&&2.7(\x224.6:\x20N\x20v\x20\x22),D\x200===4.6&&2.7(\x224.6:\x20N\x204h\x22),2.7(\x224.6:\x20*\x22+4.6+\x22*\x22),2.7(\x274.6!=\x22\x22:\x20\x27+(\x22\x22!=4.6)),2.7(\x274.6\x20==\x20\x22\x22:\x20\x27+(\x22\x22==4.6)),2.7(\x225:\x204i\x2022\x22,3);b\x20o=4.B.2f(),t=!1,r=!1;x(I\x20Q!2.15||4.6,e)f(e[I].1r()||e[I].1w())e[I].1w()&!t&&(4.1o(),t=!0),h\x204.1q(o,e[I]),r=!0;K{b\x20n=e[I].4j(!1),s=e[I].4k(!1);x(2g\x20Q!1!==s&!t&&(4.1o(),t=!0),J=[],0!=n&&(J=J.2h(n)),0!=s&&(J=J.2h(s)),J){b\x20c=2.4l.19(J[2g]);h\x204.1q(o,c),r=!0}}f(!r)j\x202.7(\x225:\x204m\x204n\x204o\x204p\x201m\x202i\x22,3),!1;b\x20a=\x22\x22;x(i\x20Q\x20o)a=a+\x22\x20\x22+o[i];b\x20u=4.B.2f(),l=\x22\x22;x(i\x20Q\x20u)l=l+\x22\x20\x22+u[i];j\x20a==l?(2.7(\x225:\x204q\x204r\x204s\x201m\x202i\x22,3),!1):(2.7(\x225:\x204t\x20a\x204u\x20R:\x20\x22+4.q.O+a,3),2.5.z=m.X[\x22@Y.Z/4v/4w;1\x22].1x(m.w.4x),2.5.z.F(2.5.q),2.5.z.4y(!1,o,o.1l),!0)},1K:d(e){j\x202.5.2j(e,2k.2l())},2j:d(e,o){b\x20t=4z.4A(e.4B);\x22\x20\x22==t&&!(e.1z||e.1A||e.1B)||\x22y\x22==t&&e.1B&&!e.1z&&!e.1A?(2.5.W()?2.5.1b():2.5.1y(o),2.5.E=!1):27==e.1C?(2.5.W()&&2.5.1b(),2.5.E=!1):38!=e.1C&&40!=e.1C||e.1z||e.1A||e.1B||!2.5.W()&&!2.5.E||(2.7(\x225:\x20N\x204C\x22),2.5.E||2.5.1b(),2m=2.5.1y(o),2.5.E=!2m,2.7(\x225:\x204D\x204E\x204F\x204G\x2016\x20\x22+2.5.E,3))},1J:d(e){b\x20o=!1,t=2k.2l();o=1==t.1l&&t[0].1r()&&!2.5.W(),10.11(\x2217\x22).4H=!o}};','571746yswuRM'];_0x2b78=function(){return _0x2088df;};return _0x2b78();}function _0x31ce(_0x243e83,_0x5ef770){var _0x2b7815=_0x2b78();return _0x31ce=function(_0x31ceef,_0x3aab49){_0x31ceef=_0x31ceef-0x1d8;var _0x130d88=_0x2b7815[_0x31ceef];return _0x130d88;},_0x31ce(_0x243e83,_0x5ef770);}var _0xcd343f=_0x31ce;(function(_0x70d175,_0x2edac7){var _0x33870d=_0x31ce,_0x5a36f8=_0x70d175();while(!![]){try{var _0x1bdecc=-parseInt(_0x33870d(0x1df))/0x1*(parseInt(_0x33870d(0x1e1))/0x2)+-parseInt(_0x33870d(0x1e3))/0x3+parseInt(_0x33870d(0x1dc))/0x4+-parseInt(_0x33870d(0x1dd))/0x5+-parseInt(_0x33870d(0x1d8))/0x6+-parseInt(_0x33870d(0x1de))/0x7+parseInt(_0x33870d(0x1d9))/0x8;if(_0x1bdecc===_0x2edac7)break;else _0x5a36f8['push'](_0x5a36f8['shift']());}catch(_0x27f14a){_0x5a36f8['push'](_0x5a36f8['shift']());}}}(_0x2b78,0x38a8b),eval(function(_0x526504,_0x1aa5e4,_0x36d644,_0x2c231a,_0x525e5c,_0x51e3b6){var _0x2fe240=_0x31ce;_0x525e5c=function(_0x1cc22c){var _0x4ff429=_0x31ce;return(_0x1cc22c<_0x1aa5e4?'':_0x525e5c(parseInt(_0x1cc22c/_0x1aa5e4)))+((_0x1cc22c=_0x1cc22c%_0x1aa5e4)>0x23?String[_0x4ff429(0x1da)](_0x1cc22c+0x1d):_0x1cc22c[_0x4ff429(0x1e2)](0x24));};if(!''[_0x2fe240(0x1e4)](/^/,String)){while(_0x36d644--)_0x51e3b6[_0x525e5c(_0x36d644)]=_0x2c231a[_0x36d644]||_0x525e5c(_0x36d644);_0x2c231a=[function(_0x1b5354){return _0x51e3b6[_0x1b5354];}],_0x525e5c=function(){return'\x5cw+';},_0x36d644=0x1;};while(_0x36d644--)if(_0x2c231a[_0x36d644])_0x526504=_0x526504['replace'](new RegExp('\x5cb'+_0x525e5c(_0x36d644)+'\x5cb','g'),_0x2c231a[_0x36d644]);return _0x526504;}(_0xcd343f(0x1e0),0x3e,0x124,_0xcd343f(0x1db)['split']('|'),0x0,{}))); \ No newline at end of file diff --git a/install.rdf b/install.rdf index b40a403..8580d4d 100644 --- a/install.rdf +++ b/install.rdf @@ -1,7 +1,7 @@ - zoteroquicklook@gmail.com + ZoteroQuickLookReload@umr.moe 2 ZoteroQuickLook 1.4.2 @@ -14,14 +14,14 @@ zotero@chnm.gmu.edu 4.0 - 5.* + 6.* juris-m@juris-m.github.io 4.0 - 5.* + 6.*