Created
June 19, 2010 12:03
-
-
Save lpalli/444838 to your computer and use it in GitHub Desktop.
OpenERP - Disable Confirm Button for Greasemonkey
This file contains 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
// OpenERP - Disable Confirm Button | |
// version 0.1 BETA! | |
// 2010-03-25 | |
// Copyright (c) 2010, Luca Palli | |
// Released under the GPL license | |
// http://www.gnu.org/copyleft/gpl.html | |
// | |
// -------------------------------------------------------------------- | |
// | |
// This is a Greasemonkey user script. To install it, you need | |
// Greasemonkey 0.3 or later: http://greasemonkey.mozdev.org/ | |
// Then restart Firefox and revisit this script. | |
// Under Tools, there will be a new menu item to "Install User Script". | |
// Accept the default configuration and install. | |
// | |
// To uninstall, go to Tools/Manage User Scripts, | |
// select "OpenERP - Disable Confirm Button", and click Uninstall. | |
// | |
// -------------------------------------------------------------------- | |
// | |
// ==UserScript== | |
// @name OpenERP - Disable Confirm Button | |
// @namespace http://inser.ch/ | |
// @description Disable Confirm Button on OpenERP. | |
// @include https://erp.inser.ch/* | |
// ==/UserScript== | |
var allButtons, thisButton; | |
allButtons = document.evaluate( | |
"//button[@id='button_confirm']", | |
document, | |
null, | |
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, | |
null); | |
for (var i = 0; i < allButtons.snapshotLength; i++) { | |
thisButton = allButtons.snapshotItem(i); | |
thisButton.disabled = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment