Skip to content

Instantly share code, notes, and snippets.

View Gaspadlo's full-sized avatar

Adam K Gaspadlo

View GitHub Profile
@Gaspadlo
Gaspadlo / FU_YT.js
Last active May 19, 2023 15:58
F***You_Youtube_1080p.js
const error = () => { console.warn('Something went to the sh*tter when setting video quality... FIX ME!'); };
setTimeout(() => {
document.querySelector('.ytp-settings-button')?.click?.();
const popup = document.querySelector('.ytp-popup.ytp-settings-menu');
if (!popup) {
return error();
}
setTimeout(() => {
const qualityButton = Array.from(popup.querySelectorAll('.ytp-menuitem'))
.filter(node => node.innerText?.includes?.('Auto (360p)'))
@Gaspadlo
Gaspadlo / tggl-track-ceil.js
Last active June 27, 2023 14:32
Toggle Track week overview logs ceiling rounder - rounds dangling seconds to full minutes (JS bookmarklet script)
javascript: window.sleepFn = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
window.processingLog = false;
window.processedLogs = 0;
clearInterval(window.roundingInterval);
window.visibleTogglEvents = Array.from(document.querySelectorAll(".rbc-event"));
window.visibleTogglEventsCount = window.visibleTogglEvents.length;
window.roundingInterval = setInterval(async () => {
if (window.processingLog) {
return;
}
@Gaspadlo
Gaspadlo / stuff_to_del.bat
Last active May 4, 2019 21:32
Fastest possible way to delete large number of files/folders for MS Win (thousands to millions of folders)
@echo off
cd /d %~dp0
set /p Input=Enter Folder name to delete:
:ConfPromt
set /p Confirm=Are you sure you want to delete "%CD%\%Input%"?(y/n):
IF /I "%Confirm%" == "n" (
Echo Canceling.
pause
EXIT /b
)
@Gaspadlo
Gaspadlo / DocumentScaling.js
Last active April 12, 2017 12:50
Vanilla Javascript Bookmarlet for document scaling. (Zoom in/Zoom out)
javascript:var HtmlES = document.documentElement.style;
setTimeout(function () {
HtmlES.transform = "scale(" + (prompt("Enter zoom level in %", "100") / 100) + ")";
HtmlES.transformOrigin = "top";
}, 10);
@Gaspadlo
Gaspadlo / PasteImgToBase64.js
Last active April 12, 2017 12:48
javascript Bookmarklet
javascript:document.body.innerHTML += "<textarea style='" +
"position:fixed;" +
"top: 0;" +
"left:0;" +
"width:80%;" +
"margin:auto;" +
"border:2px solid;" +
"z-index:999999;" +
"resize:vertical;" +
"height:25%;' id='ToBase64' " +
@Gaspadlo
Gaspadlo / getIMG.js
Last active April 12, 2017 12:46
JS bookmarklet
javascript:(function () {
if (typeof ZHJ10W1lcg === 'undefined') {/*Append jQuery into Documents Head*/
var jQuery = document.createElement('script');
jQuery.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js');
var head = document.getElementsByTagName('head');
head[0].appendChild(jQuery);
ZHJ10W1lcg = true;
}
setTimeout(function () {
$(document).ready(function () {