If you’d like to support me or my projects, feel free to donate using any of the cryptocurrencies below.
Thank you for your support!
Binance ID: 380504195
If you are use Unix/Linux create a bash script with a loop. In this case I want to backup the extensions list and install again:
First create a list of the extensions:
$ code --list-extensions > extensions.txtCreate a bash script for example with the name vscode-extension-install.sh and input the following code:
| Africa/Abidjan | |
| Africa/Accra | |
| Africa/Addis_Ababa | |
| Africa/Algiers | |
| Africa/Asmara | |
| Africa/Asmera | |
| Africa/Bamako | |
| Africa/Bangui | |
| Africa/Banjul | |
| Africa/Bissau |
Before execute you must install curl.
| let regex; | |
| /* matching a specific string */ | |
| regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello" | |
| regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO" | |
| regex = /hello/g; // looks for multiple occurrences of string between the forward slashes... | |
| /* wildcards */ | |
| regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo" | |
| regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo" |
| console.log('Client-side code running'); | |
| const button = document.getElementById('myButton'); | |
| button.addEventListener('click', function(e) { | |
| console.log('button was clicked'); | |
| fetch('/clicked', {method: 'POST'}) | |
| .then(function(response) { | |
| if(response.ok) { | |
| console.log('click was recorded'); |
The Scroll Behavior specification has been introduced as an extension of the Window interface to allow for the developer to opt in to native smooth scrolling. To date this has only been implemented in Chrome, Firefox and Opera.
There's a complete polyfill here (3.3KB minified). But most of the times, the following is enough for me (641 bytes minified):
smooth-scrolling-poyfill.js
Use as: scrollToElem('#elem-selector');
A timeline of the last four years of detecting good old window.localStorage.
October 2009: 5059daa
| // | |
| // SVG — hasClass, addClass, removeClass, toggleClass | |
| // Source: | |
| // https://gist.github.com/branneman/8436956 | |
| // Taken and adapted from: | |
| // http://toddmotto.com/hacking-svg-traversing-with-ease-addclass-removeclass-toggleclass-functions/ | |
| // | |
| if (SVGElement && SVGElement.prototype) { |