Do we really need a Cancel button next to the Save button in edit mode?

cjard

Well-known member
Joined
Jan 25, 2012
Messages
963
Programming Experience
10+
Having just accidentally clicked it and instantly/irretrievably lost my edit, I'm musing on the sense of even having such a destructive action right next to the action I want to take.. If I wanted to abandon the edit, I could always refresh, or navigate away..
 
That is standard with this forum software.
 
The following GreaseMonkey script should remove it:

JavaScript:
// ==UserScript==
// @name     RemoveEditCancelButton
// @version  1
// @include  https://csharpforums.net/*
// @grant    GM_addStyle
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @require https://code.jquery.com/jquery-3.6.0.slim.min.js
// ==/UserScript==

waitForKeyElements (
    "button[class*='js-cancelButton']",
    hideNode
);

function hideNode (jNode) {
    jNode.hide();
}
 
Back
Top Bottom