Created
March 4, 2015 17:34
-
-
Save eloyesp/959df64d0176bf3ae6d8 to your computer and use it in GitHub Desktop.
Fix de una pagina horrible hecha con ASP.net
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
// Este script hace más o menos usable la página de perfiles de Altoros, | |
// es necesario correrlo en la consola una vez en cada tab. | |
function togglePostBack() { | |
var emptyFunction = function(target) { | |
console.log(target); | |
if (target.indexOf("Middle1$Button") < 0) { | |
return; | |
} else { | |
return window.originalPostBack(); | |
} | |
}; | |
if (!window.postDisabled) { | |
window.originalPostBack = window.__doPostBack; | |
window.__doPostBack = emptyFunction; | |
window.postDisabled = true; | |
} else { | |
window.__doPostBack = window.originalPostBack; | |
window.postDisabled = false; | |
} | |
console.log(window.__doPostBack); | |
} | |
togglePostBack() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment