Plain old youtube.com (2019)

11/28/2019, 9:31:23 PM

// ==UserScript==
// @name        Plain old youtube.com (2019)
// @namespace   tei.su
// @match       https://www.youtube.com/*
// @grant       none
// @version     1.0
// @author      teidesu
// @description 11/28/2019, 9:31:23 PM
// @run-at      document-start
// ==/UserScript==

(function() {
  function replace() {
    if (!location.search.match(/[?&]disable_polymer=/)) {
      var h = location.search.indexOf('?') > -1 ? '&' : '?'
      location.href += h + 'disable_polymer=1'
    }
  }
  replace()
  window.addEventListener('popstate', replace)
  document.addEventListener('DOMContentLoaded', () => {
    document.querySelectorAll('a[href]').forEach(it => {
      if (it.href.match(/^(https?:)?\/\/(?!(www\.)?youtube\.com)/)) return // external links
      var h = it.href.indexOf('?') > -1 ? '&' : '?'
      it.href += h + 'disable_polymer=1'
    })
  })
})()

QingJ © 2025

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