diff --git a/chrome/thunderlink/content/preferences.js b/chrome/thunderlink/content/preferences.js index 60f5dbc..dd2c362 100755 --- a/chrome/thunderlink/content/preferences.js +++ b/chrome/thunderlink/content/preferences.js @@ -24,6 +24,7 @@ var ThunderLinkPrefNS = { tTextbox.setAttribute("id", "prefCustomTlString" + cstrnum + "-title"); tTextbox.setAttribute("preference", "prefs_customTlString" + cstrnum + "title"); tTextbox.setAttribute("size", 51); + tTextbox.setAttribute("value", ThunderLinkPrefNS.GetPreferenceValue("custom-tl-string-" + cstrnum + "-title", "string")); var tLabel = window.document.createElementNS(XUL_NS, "label"); tLabel.setAttribute("label", "Custom String title:"); tLabel.setAttribute("control", tTextbox.id); @@ -36,6 +37,7 @@ var ThunderLinkPrefNS = { csTextbox.setAttribute("multiline", "true"); csTextbox.setAttribute("cols", "50"); csTextbox.setAttribute("rows", "5"); + csTextbox.setAttribute("value", ThunderLinkPrefNS.GetPreferenceValue("custom-tl-string-" + cstrnum, "string")); var csLabel = window.document.createElementNS(XUL_NS, "label"); csLabel.setAttribute("label", "Custom String:"); csLabel.setAttribute("control", csTextbox.id); @@ -124,7 +126,7 @@ var ThunderLinkPrefNS = { var prefService = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefService) .getBranch("extensions.thunderlink."); - prefService.QueryInterface(Components.interfaces.nsIPrefBranch); + // prefService.QueryInterface(Components.interfaces.nsIPrefBranch); console.log("Looking for pref " + prefname + " / is it bool? " + bool); var prefValue = ""; diff --git a/chrome/thunderlink/content/thunderlink.js b/chrome/thunderlink/content/thunderlink.js index 1b82e44..e034186 100755 --- a/chrome/thunderlink/content/thunderlink.js +++ b/chrome/thunderlink/content/thunderlink.js @@ -67,11 +67,12 @@ var ThunderLinkChromeNS = { var keywords = hdr.getStringProperty("keywords"); console.log("TagEmail: cur keywords: " + keywords); - function addKeywordToList(keywords, keywordIx) { - var keyword = "$label" + keywordIx; - if (keywords.contains(keyword)) return keywords; - keywords += " " + keyword; - return keywords; + function addKeywordToList(addKeywords, addKeywordIx) { + var keyword = "$label" + addKeywordIx; + if (addKeywords.contains(keyword)) return addKeywords; + // eslint-disable-next-line no-param-reassign + addKeywords += " " + keyword; + return addKeywords; } var msg = Components.classes["@mozilla.org/array;1"] .createInstance(Components.interfaces.nsIMutableArray); diff --git a/components/thunderlinkCommandLineHandler.js b/components/thunderlinkCommandLineHandler.js index 7d6b5c4..d823c07 100755 --- a/components/thunderlinkCommandLineHandler.js +++ b/components/thunderlinkCommandLineHandler.js @@ -57,7 +57,7 @@ var thunderlinkCommandLineHandler = { if (messageIDIndex !== -1) { // messageID parameter // Convert the message URI into a folder URI - const folderURI = mailURL.slice(0, messageIDIndex).replace("thunderlink", "mailbox"); + // const folderURI = mailURL.slice(0, messageIDIndex).replace("thunderlink", "mailbox"); // console.log("folderURI is " + folderURI); // Get the message ID messageID = mailURL.slice(messageIDIndex + MESSAGE_ID_PARAM.length); @@ -69,7 +69,7 @@ var thunderlinkCommandLineHandler = { // Make sure the folder tree is initialized MailUtils.discoverFolders(); - let folder = MailUtils.getFolderForURI(folderURI, true); + // let folder = MailUtils.getFolderForURI(folderURI, true); // The folder might not exist, so guard against that // if (folder && messageID.length > 0) // msgHdr = folder.msgDatabase.getMsgHdrForMessageID(messageID); @@ -92,7 +92,8 @@ var thunderlinkCommandLineHandler = { // console.log("null msgHdr but messageID exists"); const accountManager = Cc["@mozilla.org/messenger/account-manager;1"].getService(Ci.nsIMsgAccountManager); const folders = accountManager.allFolders; - for (let msgFolder of fixIterator(folders.enumerate(), Ci.nsIMsgFolder)) { + // eslint-disable-next-line no-restricted-syntax + for (const msgFolder of fixIterator(folders.enumerate(), Ci.nsIMsgFolder)) { try { msgHdr = msgFolder.msgDatabase.getMsgHdrForMessageID(messageID); if (msgHdr !== null) { @@ -150,7 +151,7 @@ var thunderlinkCommandLineHandler = { flags: Ci.nsIClassInfo.SINGLETON, getHelperForLanguage: function getHelperForLanguage(languageIgnored) { }, getInterfaces: function getInterfaces(count) { - let interfaces = [Ci.nsICommandLineHandler]; + const interfaces = [Ci.nsICommandLineHandler]; count.value = interfaces.length; return interfaces; }, diff --git a/defaults/preferences/thunderlink.js b/defaults/preferences/thunderlink.js index f32e3aa..93f752a 100755 --- a/defaults/preferences/thunderlink.js +++ b/defaults/preferences/thunderlink.js @@ -1,3 +1,4 @@ +/* eslint-disable no-undef */ /* ThunderLink. Link from your browser to your email messages! @@ -6,7 +7,7 @@ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. + file, You can obtain one at http://mozilla.org/MPL/2.0/. */ pref("extensions.thunderlink.custom-tl-string-1-title", "thunderlink"); pref("extensions.thunderlink.custom-tl-string-1", ""); diff --git a/install.rdf b/install.rdf index 0d33223..494e418 100755 --- a/install.rdf +++ b/install.rdf @@ -6,12 +6,12 @@ ThunderLink 1.2.2-beta3 Christoph Zwirello and others - Link from your browser to your email messages! + Create and use links to specific email messages! chrome://thunderlink/content/preferences.xul {3550f703-e582-4d05-9a08-453d09bdfdc6} - 5.0 + 60.0 60.*