LightShot (prnt.sc) random screenshot

Press R on prnt.sc website to load some random screenshot

< Rückmeldungen auf LightShot (prnt.sc) random screenshot

Rezension: Gut - Skript funktioniert

NotYouMod
§
Veröffentlicht: 11.01.2022

Hi There! Script working awesome! Also, you should use window.history.go(0);, instead of window.location.href = window.location.href;(Line: 201).

KonfVerfasser
§
Veröffentlicht: 11.01.2022

What the difference? Googled but didn't get it

NotYouMod
§
Veröffentlicht: 18.01.2022

I mean, that's shorter code and also your method to reload page is for old browsers, and in modern browsers you must use window.history.go(0);

KonfVerfasser
§
Veröffentlicht: 18.01.2022

in modern browsers you must use window.history.go(0);

But why?

I agree that window.location.href = window.location.href is kinda long, so I've changed it to window.location.reload() since it shorter and tells what it does through its name

NotYouMod
§
Veröffentlicht: 19.01.2022
Bearbeitet: 19.01.2022

Okay, I'm also agreeing window.location.reload() is a better way to reload the page for better code understanding for newbies, and it looks more elegant, but in practice you better use window.location.go(0) because that will be a faster way to browser understand your code, simple reason: it is shorter, also method standard of ECMAScript how I knew, but I'm not completely sure about that.

NotYouMod
§
Veröffentlicht: 19.01.2022

And yeah, instead of proprietary Google, you better use SearX.

Antwort schreiben

Anmelden um eine Antwort zu senden.