Created
August 3, 2011 15:31
-
-
Save supahgreg/1122916 to your computer and use it in GitHub Desktop.
Press escape to close Quake Live's Game Summary, Live Game Info and notification popups
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
| // ==UserScript== | |
| // @id [email protected] | |
| // @name Quake Live Escaper | |
| // @version 1.6 | |
| // @namespace phob.net | |
| // @author wn | |
| // @description Press escape to close Quake Live's Game Summary, Live Game Info and notification popups | |
| // @include http://*.quakelive.com/* | |
| // @exclude http://*.quakelive.com/forum* | |
| // @run-at document-end | |
| // @updateURL https://gist.github.com/raw/1122916/[email protected] | |
| // ==/UserScript== | |
| function QLE(win) { | |
| document.addEventListener("keyup", function(e) { | |
| if (e.keyCode != 27) return; | |
| win.quakelive.matchtip.HideMatchTooltip(-1); | |
| win.jQuery("#stats_details, #ql_notifier .ql_notice").remove(); | |
| }, false); | |
| } | |
| if (/Firefox/i.test(navigator.userAgent)) { | |
| QLE(unsafeWindow); | |
| } | |
| else { | |
| var scriptNode = document.createElement("script"); | |
| scriptNode.setAttribute("type", "text/javascript"); | |
| scriptNode.text = "(" + QLE.toString() + ")(window);"; | |
| document.body.appendChild(scriptNode); | |
| document.body.removeChild(scriptNode); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment