Skip to content

Instantly share code, notes, and snippets.

@sevenc-nanashi
Last active September 29, 2024 21:51
Show Gist options
  • Save sevenc-nanashi/83d7214c43e47f9f689a9199f81f0a8e to your computer and use it in GitHub Desktop.
Save sevenc-nanashi/83d7214c43e47f9f689a9199f81f0a8e to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Open YouTube App (Patched)
// @version 2.0.0
// @author Nanashi. <https://sevenc7c.com>, original by asportnoy
// @match *://*.youtube.com/*
// @downloadURL https://gist.github.com/sevenc-nanashi/83d7214c43e47f9f689a9199f81f0a8e/raw/open-yt-patched.user.js
// @updateURL https://gist.github.com/sevenc-nanashi/83d7214c43e47f9f689a9199f81f0a8e/raw/open-yt-patched.user.js
// @homepage https://gist.github.com/sevenc-nanashi/83d7214c43e47f9f689a9199f81f0a8e
// @inject-into content
// ==/UserScript==
// Disable in iframe and /redirect
if (window.parent !== window || window.location.pathname === '/redirect') return;
window.location.href = `youtube://${window.location.pathname.slice(1)}${
window.location.search
}${window.location.hash}`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment