Skip to content

Instantly share code, notes, and snippets.



Last active Nov 1, 2020
What would you like to do?
Turn Youtube links into IINA application links.
// ==UserScript==
// @name Open Youtube links in IINA
// @namespace
// @description Replaces Youtube links with a link to open them in IINA. Set a useful whitelist for yourself.
// @include **
// @updateURL
// @downloadURL
// @run-at document-end
// @version 1.0
// ==/UserScript==
var ans = document.getElementsByTagName("a");
for (var i = 0; i < ans.length; i++)
var ref = ans[i].href;
if (ref.includes("") || ref.includes(""))
ans[i].href = "iina://weblink?url=" + ref;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment