What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-21 22:31:12
give gray offlien scale to website
window.addEventListener('online', function(e) { // add your logic to update the UI when online console.log("You are online"); document.body.style.filter = 'grayscale(0)'; }, false); window.addEventListener('offline', function(e) { ... Add solution -
Html 2021-11-21 09:29:14
electron reload html
const {getCurrentWindow, globalShortcut} = require('electron').remote; var reload = ()=>{ getCurrentWindow().reload() } globalShortcut.register('F5', reload); globalShortcut.register('CommandOrControl+R', reload); // here is the fix bug #3778, if y... Add solution -
Javascript 2021-11-21 06:51:29
react addeventlistener useeffect
//101-Example const callback = useCallback((event: any) => { event.data.status === "complete" ? setProgress(0) : setProgress(event.data.uploadProgress); },[]) useEffect(() => { window.addEventListener("file-upload&q... Add solution -
Other 2021-11-20 19:08:22
could not connect to websocket endpoint ws://localhost:4000/graphql. please check if the endpoint url is correct.
The it turns out that Firefox has issues with websockets (see this bug report that has been re-appeared even after the supposed fix). In Firefox it works directly after starting a novel browser but after some hot reloading it stops working. The following... Add solution -
Javascript 2021-11-20 15:09:20
play background music in html jasvascript
<audio src="https://www.bensound.com/bensound-music/bensound-moose.mp3"></audio> <Script> window.addEventListener("DOMContentLoaded", event => { const audio = document.querySelector("audio"); a... Add solution -
Javascript 2021-11-16 10:51:06
JavaScript that executes after page load
//two ways of executing JS code after page is loaded, use "DOMContentLoaded" when able document.addEventListener("DOMContentLoaded", function(){ //dom is fully loaded, but maybe waiting on images & css files }); window.... Add solution
Best helpers
Ranking is empty