Skip to content

Instantly share code, notes, and snippets.

@JenieX
JenieX / reddit.videos.space.bar.to.play.pause.user.js
Last active September 1, 2022 04:44
Reddit Videos - Play/Pause a focused video by pressing the [Space Bar]
// ==UserScript==
// @name Reddit Videos - [Space Bar] to Play/Pause
// @namespace https://github.com/FlowerForWar/Reddit-Videos-Space-Bar-to-Play-Pause
// @description Play/Pause a focused video by pressing the [Space Bar]. Automatically focus an auto-playing video
// @version 0.05
// @author FlowrForWar
// @match https://www.reddit.com/*
// @grant none
// @compatible edge Tampermonkey or Violentmonkey
// @compatible firefox Greasemonkey, Tampermonkey or Violentmonkey
@JenieX
JenieX / an-attempt-to-disable-reddit-infinite-scroll.user.js
Created May 12, 2022 04:17
Attempts to disable Reddit infinite scroll by the help of blocking the address that dynamically loads posts
// ==UserScript==
// @name An Attempt to Disable Reddit Infinite Scroll
// @namespace 1650776408
// @description Attempts to disable Reddit infinite scroll by the help of blocking the address that dynamically loads posts
// @version 0.01
// @author FlowrForWar
// @match https://www.reddit.com/r/*
// @grant none
// @run-at document-start
// @require https://greasyfork.org/scripts/12228/code/setMutationHandler.js
@JenieX
JenieX / pretending-tab-images-viewer.user.js
Created May 12, 2022 04:18
A simple User Script that opens the full size image in tab like view
// ==UserScript==
// @name Pretending Tab - Images Viewer
// @namespace https://github.com/FlowerForWar/Pretending-Tab-Images-Viewer
// @description Opens the full size image in tab like view. Offering three view states. Fitting, filling, original.
// @version 0.14
// @author FlowrForWar
// @include *
// @grant GM_xmlhttpRequest
// @grant GM.xmlHttpRequest
// @grant GM_setClipboard
// ==UserScript==
// @name Was about that old in that movie
// @namespace https://github.com/FlowerForWar/was-about-that-old-in-that-movie
// @description IMDb movies - hovering actors avatars would show how old they were when that movie was released
// @version 0.01
// @author FlowrForWar
// @include /https:\/\/www\.imdb\.com\/title\/tt\d+\/($|\?.+)/
// @grant none
// @compatible edge Violentmonkey
// @supportURL https://github.com/FlowerForWar/was-about-that-old-in-that-movie
@JenieX
JenieX / for_vs_forEach.html
Created May 25, 2022 02:13 — forked from jcunews/for_vs_forEach.html
Simple performance test comparison between `for` and `forEach()` loop. Both loops enumerates an array of 50,000,000 elements for 10 times.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>for vs forEach</title>
<style>
.columns {
column-count: 2;
}
.report {
@JenieX
JenieX / redditvideoquality.user.js
Created June 20, 2022 14:43 — forked from x0a/redditvideoquality.user.js
Forces the highest quality video on Reddit
// ==UserScript==
// @name Force highest resolution on Reddit
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Parses the mpd file sent to reddit's video player and removes all but the highest resolution representations for each video period
// @author x0a
// @run-at document-start
// @match https://www.reddit.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com
// @grant none
@JenieX
JenieX / beforescriptexecute-polyfill.js
Created June 21, 2022 00:36 — forked from x0a/beforescriptexecute-polyfill.js
Lightweight beforescriptexecute / onbeforescriptexecute polyfill
(function(){
if("onbeforescriptexecute" in document) return; // Already natively supported
let scriptWatcher = new MutationObserver(mutations => {
for(let mutation of mutations){
for(let node of mutation.addedNodes){
if(node.tagName === "SCRIPT"){
let syntheticEvent = new CustomEvent("beforescriptexecute", {
detail: node,
cancelable: true
@JenieX
JenieX / eslint_prettier_airbnb.md
Created June 22, 2022 06:20 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@JenieX
JenieX / youtube.com - Replace Apple Touch Icon.user.js
Created August 25, 2022 05:58 — forked from piejanssens/youtube.com - Replace Apple Touch Icon.user.js
Userscript: youtube.com - Replace Apple Touch Icon
// ==UserScript==
// @name Replace YouTube Apple Touch Icon
// @version 1.0.0
// @author piejanssens
// @match *://*.youtube.com/*
// @downloadURL https://gist.githubusercontent.com/piejanssens/aa2360de4d14233cb1e92d1a6864c6e6/raw/57f9b6496202139d42b41920e54186c77c33a3ea/youtube.com%2520-%2520Replace%2520Apple%2520Touch%2520Icon.user.js
// @updateURL https://gist.githubusercontent.com/piejanssens/aa2360de4d14233cb1e92d1a6864c6e6/raw/57f9b6496202139d42b41920e54186c77c33a3ea/youtube.com%2520-%2520Replace%2520Apple%2520Touch%2520Icon.user.js
// @homepage https://gist.github.com/piejanssens/aa2360de4d14233cb1e92d1a6864c6e6/
// ==/UserScript==
document.querySelectorAll("link[rel='apple-touch-icon-precomposed']").forEach(e => e.remove());
const getRandomizedBoxes = ()=>{
const getRandomInt = (min,max)=>{
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min) + min);
//The maximum is exclusive and the minimum is inclusive
}
const boxes = Array(100);