Skip to content

Instantly share code, notes, and snippets.

@eloyesp
Created March 4, 2015 17:34
Show Gist options
  • Save eloyesp/959df64d0176bf3ae6d8 to your computer and use it in GitHub Desktop.
Save eloyesp/959df64d0176bf3ae6d8 to your computer and use it in GitHub Desktop.
Fix de una pagina horrible hecha con ASP.net
// 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