Fix full-screen video colors glitch on macOS

For macOS users. Fix visual color artifacts in full-screen videos on external monitor when the f.lux app of night shift is running.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name              Fix full-screen video colors glitch on macOS
// @name:en           Fix full-screen video colors glitch on macOS
// @name:zh           修复在 macOS 上全屏观看视频可能变黄的问题
// @name:zh-CN        修复在 macOS 上全屏观看视频可能变黄的问题
// @namespace         http://tampermonkey.net/
// @version           0.1
// @description       For macOS users. Fix visual color artifacts in full-screen videos on external monitor when the f.lux app of night shift is running.
// @description:en    For macOS users. Fix visual color artifacts in full-screen videos on external monitor in Chrome when the f.lux app of night shift is running.
// @description:zh-CN 适用于 macOS 系统。当 mac 外接显示器同时使用 f.lux 或者 夜览模式时,使用浏览器观看全屏观看视频,屏幕会变黄,此脚本将修复此问题。
// @author            nozomi22
// @license           MIT License
// @match             *://www.bilibili.com/video/*
// @match             *://www.youtube.com/*
// @match             *://www.netflix.com/*
// @grant             none
// ==/UserScript==

(function () {
    var style = document.createElement ("style");
//    style.appendChild (document.createTextNode (""));
    document.head.appendChild (style);
    var ss = style.sheet;
    ss.insertRule (":-webkit-full-screen video {opacity: 0.996 !important;}", 0);
    ss.insertRule (":fullscreen video {opacity: 0.996 !important;}", 0);
})();