Netflix One Pace Font (ImpressBT)

Styles the Netflix Subtitles to look like One Pace

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Netflix One Pace Font (ImpressBT)
// @license      MIT
// @description  Styles the Netflix Subtitles to look like One Pace
// @namespace    okthx
// @author       okthx
// @version      1.0.1
// @homepage     https://twitter.com/nathangamz
// @match        https://www.netflix.com/watch/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=netflix.com
// @grant        none
// @noframes
// ==/UserScript==

(function() {
    'use strict';

    // Insert the Impress BT font into the page's head
    let fontLink = document.createElement("link");
    fontLink.href = "https://fonts.cdnfonts.com/css/impress-bt";
    fontLink.rel = "stylesheet";
    document.head.appendChild(fontLink);

    // Apply custom style to Netflix subtitles
    let fontStyle = `
.player-timedtext-text-container * {
    font-family: 'Impress BT', sans-serif !important;
    font-size: 40px !important;
    font-weight: 500 !important;
    text-shadow: -3px 0px 0 #000, 3px 0px 0 #000, 0px -3px 0 #000, 0px 3px 0 #000,
                 -3px -3px 0 #000, -3px 3px 0 #000, 3px -3px 0 #000, 3px 3px 0 #000,
                 0px 0px 6px rgba(0,0,0,0.4) !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: white !important;
}
`;
    let newStyle = document.createElement("style");
    newStyle.innerHTML = fontStyle;
    document.head.appendChild(newStyle);
})();