Netflix Tweaks

Hide the advert on the home page, adjust brightness/contrast

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Netflix Tweaks
// @namespace    joeytwiddle
// @version      0.0.4
// @description  Hide the advert on the home page, adjust brightness/contrast
// @author       joeytwiddle
// @license      ISC
// @match        https://www.netflix.com/*
// @icon         https://www.google.com/s2/favicons?domain=netflix.com
// @grant        GM_addStyle
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

	const hideTopRecommendation = true;

	// Note: When increasing the brightness, we need to reduce the other two for balance.
	// Otherwise the saturation appears increased, and the top whites get washed out.
	const videoFilter = 'brightness(1.3) contrast(0.9) saturate(0.85)';

	if (typeof hideTopRecommendation !== 'undefined' && hideTopRecommendation) {
		GM_addStyle(`
			.volatile-billboard-animations-container {
				display: none;
			}
			/* Add some whitespace to compensate */
			#main-view {
				padding-top: 4em;
			}
		`);
	}

	if (typeof videoFilter === 'string' && videoFilter !== '') {
		GM_addStyle(`
			video {
				filter: ${videoFilter};
			}
		`);
	}

})();