Greasy Fork is available in English.

HIT Forker

Monitors mturk.com for HITs

< Rückmeldungen aufHIT Forker

Frage/Kommentar

§
Veröffentlicht: 10.03.2020

[WISH] add code to confirm navigation away from page.

it is way too easy to accidentally refresh the page! I found a few lines of code that can catch page reload, back button or some gesture. instead of losing the current hit history, you get a confirmation to leave the page. I can live with the annoyance of clicking to confirm. I imagine some would want the option to turn it off.

either way, it's easy enough to paste a few lines [code]

//developer.mozilla.org/en-US/docs/Web/Events/beforeunload
//stackoverflow.com/questions/821011/prevent-a-webpage-from-navigating-away-using-javascript    

// this does work waterfox56, HF ~L160 above var PandaCrazy = ...
// assumed to work in most browsers but I didn't test it.
 // also, pinned tabs redirects an accidental bookmarks reloading the page
// all the links are already opening in new tab.
//
    window.addEventListener('beforeunload', (event) => {
      // Cancel the event as stated by the standard.
      event.preventDefault();
      // Chrome requires returnValue to be set.
      event.returnValue = '';
    });

[/code] few other wishes: be nice if there was a way to verify HF wasn't hung, check timer advancing? move timer near history?

make hits fixed height so page jumps around less

make long hit titles wrap?

great work, would be even better with some navigation protection

Antwort schreiben

Anmelden um eine Antwort zu senden.