Skip to content

Instantly share code, notes, and snippets.

@Leo1003
Created October 10, 2022 18:40
Show Gist options
  • Save Leo1003/dcc630e2fd36abd2eef216e7f6b3d296 to your computer and use it in GitHub Desktop.
Save Leo1003/dcc630e2fd36abd2eef216e7f6b3d296 to your computer and use it in GitHub Desktop.
Useful Greasemonkey scripts
// ==UserScript==
// @name wikipedia_desktop_redirect
// @namespace https://jspenguin.org/monkey
// @description Redirect mobile wikipedia to desktop version
// @include http://*.m.wikipedia.org/*
// @include https://*.m.wikipedia.org/*
// @version 1
// @grant none
// ==/UserScript==
var m = /^(https?:\/\/.*)\.m(\.wikipedia\.org\/.*)/.exec(location.href);
if (m) location.href = m[1] + m[2];
// ==UserScript==
// @name youtube_shorts_redirect
// @namespace https://jspenguin.org/monkey
// @description Redirect from Youtube Shorts interface to normal video page
// @include https://www.youtube.com/shorts/*
// @include http://www.youtube.com/shorts/*
// @version 1
// @grant none
// ==/UserScript==
var m = /^(https?:\/\/)www\.youtube\.com\/shorts\/(.*)/.exec(location.href);
if (m) location.href = m[1] + "www.youtube.com/watch?v=" + m[2];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment