Greasy Fork 还支持 简体中文。

Plain old youtube.com (2019)

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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'
    })
  })
})()