Huluuuuuuuuuu

Huluの新デザイン(20/4/7)で右クリック、左クリック系イベント禁止を回避する

目前為 2020-04-07 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Huluuuuuuuuuu
// @namespace    https://twitter.com/rin_jugatla
// @version      0.1
// @description  Huluの新デザイン(20/4/7)で右クリック、左クリック系イベント禁止を回避する
// @author       rin_jugatla
// @match        https://www.hulu.jp/*
// @grant        none
// ==/UserScript==

(function() {
    // 左クリック系禁止解除
    // 参考
    // テキストがコピー不可のWebサイトでテキストをコピーする3つの方法
    // https://iwb.jp/disabled-text-copy-website/
    var css = '* { user-select: auto !important; }';
    var head = document.head || document.getElementsByTagName('head')[0];
    var style = document.createElement('style');
    head.appendChild(style);
    style.appendChild(document.createTextNode(css));
    // 右クリック禁止解除
    // 参考
    // JavaScriptによる右クリックの禁止・禁止を解除する方法
    // https://qiita.com/awesam86/items/65255f1b034b43011a5a
    document.oncontextmenu = function () {return true;}
})();