Created
April 25, 2014 14:31
-
-
Save gialloporpora/11291598 to your computer and use it in GitHub Desktop.
This code add an hotkey to switch from View Watched Thread with Unread and All Thread in Thunderbird using userChrome.js add-on.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (location == "chrome://messenger/content/messenger.xul") { | |
/* Aggiungo l'accel text nella voce di menu */ | |
document.getElementById('viewWatchedThreadsWithUnreadMenuItem').setAttribute('acceltext', 'Maiusc+W'); | |
/* Seleziono il main keyset dove sono inserite le scorciatoie da tastiera */ | |
let ks = document.getElementById('mailKeys'); | |
/* Creo una nuova chiave */ | |
let nk = document.createElement('key'); | |
nk.setAttribute('id', 'key_viewwatchedthreadwithunread'); | |
nk.setAttribute('modifiers','shift'); | |
nk.setAttribute('keycode', 'w'); | |
nk.setAttribute("oncommand", "if (gFolderDisplay.view.specialView) goDoCommand('cmd_viewAllMsgs'); else goDoCommand('cmd_viewWatchedThreadsWithUnread');"); | |
ks.appendChild(nk); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment