YouTube - whitelist channels in uBlock Origin

To whitelist YouTube channels in uBlock Origin

当前为 2016-01-25 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
gorhill
评分
0 0 0
版本
1.3
创建于
2015-10-20
更新于
2016-01-25
大小
1.9 KB
许可证
http://creativecommons.org/licenses/by-sa/4.0/
适用于

Source: https://github.com/gorhill/uBlock/wiki/How-to-whitelist-a-web-site#a-youtube-channel

  • Install the user script.
  • Locate and copy the Youtube channel owner's name.
  • Once you have the channel owner's name:
    • Go to the Whitelist pane in uBlock Origin's dashboard.
    • Add the line *youtube.com/*user=[CHANNEL_OWNER'S_NAME]*.
    • Replace [CHANNEL_OWNER'S_NAME] with the channel owner's name you extracted earlier.
    • Example: *youtube.com/*user=jacksfilms*.
    • Click Apply changes once you added the whitelist directive.

Optionally, add the following bookmarklet to your toolbar: it will create a whitelist directive for you to add to uBlock Origin for the channel owner of the current Youtube page:

  • Chromium-based browsers: right-click on the toolbar, select "Add page..."
  • Firefox-based browsers: right-click on the toolbar, select "New Bookmark..."
  • Fill in the fields:
    • Name: uBO: YT channel whitelist directive (change as you wish)
    • URL/location: see below.
    • Click "Save" or "Add".

Bookmarklet URL/location:

javascript:(function() {"use strict";var e = document.querySelector('[href*="/user/"]');if (null !== e) {var t = e.getAttribute("href") || "",r = t.match(/\/user\/([^\/?]+)/);if (null !== r) return void alert("uBO whitelist directive for this channel:\nyoutube.com/*user=" + r[1] + "*")}alert("No Youtube user name found on this page.")})();

Once you click this bookmarklet while on a Youtube page, it will extract the channel owner's name and create a valid directive to be pasted in the Whitelist pane of uBlock Origin if you want to whitelist the Youtube channel.