init: mep
This commit is contained in:
10
rewrite-reddit.js
Normal file
10
rewrite-reddit.js
Normal file
@@ -0,0 +1,10 @@
|
||||
// ==UserScript==
|
||||
// @name rewrite-reddit
|
||||
// @namespace toerd
|
||||
// @description Rewrite new to old reddit
|
||||
// @include *www.reddit.com*
|
||||
// @version 1
|
||||
// @run-at document-start
|
||||
// ==/UserScript==
|
||||
|
||||
// window.location.replace(window.location.toString().replace(/www/, 'old'));
|
||||
15
stack_datetime.js
Normal file
15
stack_datetime.js
Normal file
@@ -0,0 +1,15 @@
|
||||
// ==UserScript==
|
||||
// @name stack-date-time
|
||||
// @namespace phga
|
||||
// @description Display "normal" timestamps on SE Answers
|
||||
// @include *stack*
|
||||
// @version 1
|
||||
// @run-at document-load
|
||||
// ==/UserScript==
|
||||
(function() {
|
||||
const reltimes = [...document.getElementsByClassName("relativetime")];
|
||||
console.log(reltimes);
|
||||
reltimes.forEach(e => {
|
||||
e.innerHTML = e.title;
|
||||
});
|
||||
})();
|
||||
29
yt-default-speed.js
Normal file
29
yt-default-speed.js
Normal file
@@ -0,0 +1,29 @@
|
||||
// ==UserScript==
|
||||
// @name Default Speed for YT Videos
|
||||
// @version 1.0.0
|
||||
// @description Speed up YouTube Videos
|
||||
// @author phga
|
||||
// @match *://*.youtube.com/*
|
||||
// @exclude *://*.youtube.com/subscribe_embed?*
|
||||
// ==/UserScript==
|
||||
const speed = 1.5;
|
||||
const timeout = 100;
|
||||
const waitAndRunSpeed = () => {
|
||||
setTimeout(setVideoSpeed, timeout);
|
||||
}
|
||||
const setVideoSpeed = () => {
|
||||
const ad = [...document.querySelectorAll('.ad-showing')][0];
|
||||
const video = document.querySelector('video');
|
||||
// If no ad is playing and the video has really started
|
||||
if (!ad && video.currentTime >= 1) {
|
||||
video.playbackRate = speed;
|
||||
console.log(`Set video speed to ${speed}`);
|
||||
} else {
|
||||
console.log("Ad is running. Retrying to set video speed...");
|
||||
setTimeout(setVideoSpeed, timeout);
|
||||
}
|
||||
}
|
||||
|
||||
// So we do not have to constantly run the function with setInterval
|
||||
window.navigation.addEventListener("navigate", waitAndRunSpeed);
|
||||
waitAndRunSpeed();
|
||||
31
yt-no-ads.js
Normal file
31
yt-no-ads.js
Normal file
@@ -0,0 +1,31 @@
|
||||
// ==UserScript==
|
||||
// @name Auto Skip YouTube Ads
|
||||
// @version 1.0.0
|
||||
// @description Speed up and skip YouTube ads automatically
|
||||
// @author jso8910
|
||||
// @match *://*.youtube.com/*
|
||||
// @exclude *://*.youtube.com/subscribe_embed?*
|
||||
// ==/UserScript==
|
||||
|
||||
// Does not work 2025-10-05T20:16
|
||||
// <button class="ytp-skip-ad-button" id="skip-button:c" style="opacity: 0.5;">flex
|
||||
const clickAdButton = () => {
|
||||
const btn = document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button,.ytp-skip-ad-button');
|
||||
if (btn) {
|
||||
btn.click();
|
||||
console.log("Clicked the skip button")
|
||||
}
|
||||
};
|
||||
|
||||
const speedUpAd = () => {
|
||||
const ad = [...document.querySelectorAll('.ad-showing')][0];
|
||||
if (ad) {
|
||||
document.querySelector('video').playbackRate = 10;
|
||||
console.log("Speed up ad!!");
|
||||
setTimeout(clickAdButton, 500);
|
||||
// setInterval(clickAdButton, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
// Run every 200ms
|
||||
setInterval(speedUpAd, 200);
|
||||
16
yt-no-inline-ads.js
Normal file
16
yt-no-inline-ads.js
Normal file
@@ -0,0 +1,16 @@
|
||||
// ==UserScript==
|
||||
// @name Remove YT Inline Ads
|
||||
// @version 1.0.0
|
||||
// @description Removes YT Inline Ads
|
||||
// @author phga
|
||||
// @match *://*.youtube.com/*
|
||||
// @exclude *://*.youtube.com/subscribe_embed?*
|
||||
// ==/UserScript==
|
||||
const removeAds = () => {
|
||||
const ads = [...document.querySelectorAll('ytd-ad-slot-renderer')];
|
||||
if (ads.length > 0) {
|
||||
ads.forEach(e => e.remove());
|
||||
}
|
||||
}
|
||||
|
||||
setInterval(removeAds, 2000);
|
||||
16
yt-no-shorts.js
Normal file
16
yt-no-shorts.js
Normal file
@@ -0,0 +1,16 @@
|
||||
// ==UserScript==
|
||||
// @name Remove YT Shorts
|
||||
// @version 1.0.0
|
||||
// @description Removes YT Shorts
|
||||
// @author phga
|
||||
// @match *://*.youtube.com/*
|
||||
// @exclude *://*.youtube.com/subscribe_embed?*
|
||||
// ==/UserScript==
|
||||
const removeShorts = () => {
|
||||
const shorts = [...document.querySelectorAll('[is-shorts],.ytd-reel-shelf-renderer')];
|
||||
if (shorts.length > 0) {
|
||||
shorts.forEach(e => e.remove());
|
||||
}
|
||||
}
|
||||
|
||||
setInterval(removeShorts, 2000);
|
||||
Reference in New Issue
Block a user