Detect when your site is visible to users
tipjs,web_developer
document.onvisibilitychange = function () {
document.visibilityState === "visible"
? (document.title = "👋 Hello")
: (document.title = "😟 Bye!");
};Có thể bạn đã miss một số snippets code
Ajax, call jQuery POST to node.js expressjs
Ajax, call jQuery POST to node.js expressjs
using javascript callback style error handling
Copy a string to the clipboard
Copy a string to the clipboard. Only works as a result of user action (i.e. inside a click event listener).
encode/decode base64 with JS
Encoding to base64 is done with the btoa command
Object.keys và Object.getOwnPropertyNames
Object.keys và Object.getOwnPropertyNames