Invidiously

Redirect all youtube links for palemoon

目前為 2021-08-07 提交的版本,檢視 最新版本

// ==UserScript==
// @name        Invidiously
// @namespace   Backend
// @description Redirect all youtube links for palemoon
// @match *://*.youtube.com/*
// @match *://*.youtu.be.com/*
// @version     1.0
// @grant       none
// ==/UserScript==

/* 
N O T E 
First disable javascript on the youtube site, I personally use ublock to disable all javascript and rubbish, 
This will improve performance on goanna based browsers, that aren't really supported for the new polymer ui...
*/
const instances = [
  "https://vid.puffyan.us",
  "https://invidious.snopyta.org",
  "https://yewtu.be"
];

(() => { //IIFE arrow function
    if (window.location.pathname == "/") {
        'use strict';
        document.location.replace(instances[0] + "/feed/popular");
    } else if (window.location.href == "/watch") {
        'use strict';
        let id = window.location.href.match('\/watch.*');
        document.location.replace(instances[0] + id[0]);
    }
})();






QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址