My idea was to remove the capability to enter information or perform any kind of input so that you had to sit with whatever you typed, unable to “use” it. The biggest pitfall with this code is that i have no idea how to disable the whole ‘press enter’ function of search bars, etc. So that might mean it works a little better for things like email, where in email you have to use command-enter and that may be a little less accessible.
// global applications
ready('button[type="submit"]', rhetorical);
ready('button[type="Submit"]', rhetorical);
ready('input[type="submit"]', rhetorical);
ready('input[type="Submit"]', rhetorical);
ready('#send', rhetorical);
ready('#submit', rhetorical);
ready('.send', rhetorical);
ready('.submit', rhetorical);
// amazon and gmail?
ready('.gbqfi', rhetorical);
ready('#add-to-cart-button', rhetorical);
ready('.global_search-submit_button', rhetorical);
ready('.global_search-search_icon', rhetorical);
ready('.nav-search-submit', rhetorical);
// doodle poll
ready('.d-participateButton', rhetorical);
ready('#d-subscribeToPoll', rhetorical);
// these did things that are now redundant i think
//ready('div center input', rhetorical);
//ready('#hptl', rhetorical);
//ready('div a.gb_b', rhetorical);
//ready('div a.gb_ab', rhetorical);
//ready('#gbqfbb', rhetorical);
//ready('input[value="Google Search"]', rhetorical);
//ready('input[value="I\'m Feeling Lucky"]', rhetorical);
//ready('input[name="btnK"]', rhetorical);
//ready('.gU', rhetorical);
//ready('div a.gb_P', rhetorical);
// global 'contains' THESE WILL OVERRIDE IF FALSE AND FIRST
ready('div[role="button"]', rhetoricaltext);
ready('div center input', rhetoricaltext);
function rhetoricaltext(e) {
// get the text of this <p>
var text = j(e).text();
// test to see if this <p>'s text has what we're looking for
if(text.contains('Send') || text.contains('send') || text.contains('Submit') || text.contains('submit')){
j(e).fadeOut(4400);
}
}
function rhetorical(e) {
j(e).fadeOut(2200);
}
function highlight(e) {
j(e).css('background-color','red');
}
unintended consequences: