Last active
August 29, 2015 14:08
-
-
Save johnelliott/690905bb909347a56941 to your computer and use it in GitHub Desktop.
Fix code school kill line and delete
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== | |
// @name monkeybusiness-codeschool | |
// @namespace https://github.com/johnelliott/monkeybusiness | |
// @include http://*.codeschool.com/* | |
// ==/UserScript== | |
//document.querySelector("div.CodeMirror textarea").focus(); | |
// make script tag | |
var ninjaScript = document.createElement("script"); | |
ninjaScript.text = 'var n = getEventListeners(document.body).keyup;\n' + | |
'console.log("do we have an n?", n);\n' + | |
'document.body.removeEventListener("keyup", n[0].listener);\n' + | |
'// put listener back and see if it\'s \n' + | |
'\n' + | |
'function guardedKeyupListener(e) {\n' + | |
' if ((e.keyCode === 75 || e.keyCode === 74) && e.ctrlKey) {\n' + | |
' console.log("return?");\n' + | |
' return;\n' + | |
' }\n' + | |
' console.log("listener call");\n' + | |
' n[0].listener.call(this, e);\n' + | |
'}\n'; | |
document.body.appendChild(ninjaScript); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment