Skip to content

Instantly share code, notes, and snippets.

@vandanojan
vandanojan / Re-enable-Right-Click-Option-on-Web-Page.js
Last active August 12, 2024 21:05
To re-enable the right click (context) menu, it is enough to copy the code, type "javascript:" in the address bar of your browser and then paste the copied code, i.e., javascript:[CODE]
function enableContextMenu(aggressive = true) {
void (document.ondragstart = null);
void (document.onselectstart = null);
void (document.onclick = null);
void (document.onmousedown = null);
void (document.onmouseup = null);
void (document.body.oncontextmenu = null);
enableRightClickLight(document);
if (aggressive) {
enableRightClick(document);
@ibrahimhajjaj
ibrahimhajjaj / currencies-with-flags.json
Last active September 19, 2024 10:29
Currencies json that contains currency flag as image data, currency codes, currency name, currency base country name, currency base country code.
[
{
"code": "AED",
"name": "UAE Dirham",
"country": "United Arab Emirates",
"countryCode": "AE",
"flag": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAG5SURBVHja7JdLihRBEEBfVqUU6rQNggiCFxA8gswFRNy49gAeQdx4G8HbuHDvRkRUnKxPZ2dGhous6Y9TtavPZmITtYggXsWPSKOqrCkFK8stgAFKoOr1kiKAt8CD76/f/KYYj//u7bPpU28Mn199eGiBLabg7uWLUePLp08mB/j66xvA1gKVSkK9J/29guuxNCZrVX60905qZlD0xvd5XbPvmN22uo+XCFDZXI2Idjt0txuk9TFM+ve7Yk9MAkAPIKSuI3XdoEMX/aQAd4qSfYpHAI0RbVt0FGA/KYAtyvMMaBTUObRpBh2a0E3cgspewkkJQkDqGm3bQfNPL9/PtIQ+cmjC5OqbTaj9qppRcglCAFej3h9H8P9xnBUgCtRNBllYDj0QmxbWAkgxggiktFjg60PosAeMJnQtAIkRq7poBlIfK5cgRBQdzYC1dtLgVVVRluUJgEQo7XH0RminlBDCKUDK99AIwByXs4gcb0JJafaFc7aCjTlktQBIqpiVAPIYas5AcXEx6LCRzaxjKAn4465GjZ1zs13GBngMPAceLbyFfwJfTP8m2PR6SfGAM7eP07UB/g0Aw73uXdMbeJMAAAAASUVORK5CYII="
},
{
"code": "AFN",
@barbietunnie
barbietunnie / download-old-chrome-versions.md
Last active September 9, 2024 23:19
How to download old versions of Chrome

How to download old versions of Chrome

Click here to download old versions of Chrome for Linux, Mac and Windows.

The download_url field of the desired section houses the URL to the download.

Alternatively, for not too old versions, you can get it directly here.

@milankragujevic
milankragujevic / youtube-extract-ids-from-playlist.js
Created July 28, 2017 00:30
To extract all the video IDs from a YouTube playlist. Open the playlist page, scroll down to the bottom, click load more, repeat until the end, then open Console and paste this code. Output is a list of video IDs from the page.
var els = document.getElementsByClassName('pl-video');
for(i = 0; i < els.length; i++) {
var el = els[i];
if(el) {
var src = el.getElementsByClassName('yt-thumb-clip')[0].getElementsByTagName('img')[0].src;
if(!src.match(/\.com\/vi\//g)) { continue; }
var id = src.split('.com/vi/')[1].split('/')[0];
console.log(id);
}