Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function userChromeUnbindKey(keyset_id, key_id) {
- console.log("userChromeUnbindKey");
- var keyset = document.getElementById(keyset_id);
- if (!keyset) {
- console.log("Could not find keyset " + keyset_id);
- return;
- }
- var key = document.getElementById(key_id);
- if (!key) {
- console.log("Could not find key " + key_id);
- return;
- }
- keyset.removeChild(key);
- }
- // Example usage
- // Look in https://searchfox.org/comm-central/rev/7d1490648ebd27d61cfe7fe8272a8ebb7c9f8e5c/suite/mailnews/content/mailWindowOverlay.xul
- // (searchfor "<keyset") to find the names of keys to unbind.
- if (location.href.startsWith("chrome://messenger/content/messenger.x")) {
- userChromeUnbindKey("mailKeys", "key_archive");
- userChromeUnbindKey("mailKeys", "key_killThread");
- userChromeUnbindKey("mailKeys", "key_killSubthread");
- userChromeUnbindKey("mailKeys", "key_watchThread");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement