Created
January 30, 2010 01:13
-
-
Save toolmantim/290315 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| (function () { | |
| if (!window.fluid) return; | |
| // Dock badge unread messages | |
| setInterval(function() { | |
| var m = document.title.match(/\((\d+)\)/); | |
| window.fluid.dockBadge = m ? parseInt(m[1]) : ''; | |
| }, 1000); | |
| // Bind Ctrl-A to the Archive button | |
| document.addEventListener("keydown", function(e) { | |
| var archiveButton = document.querySelector(".wd-focus [dc='archive']"); | |
| if (e.keyCode == 65 && e.ctrlKey && archiveButton) { | |
| var click = document.createEvent("MouseEvents"); | |
| click.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); | |
| archiveButton.dispatchEvent(click); | |
| } | |
| }, false); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment