Last active
January 16, 2024 09:17
-
-
Save ngseke/8b30050e05703f35c753cd0ac6330028 to your computer and use it in GitHub Desktop.
把 YouTube CC 字幕變成粉圓體 `jf-openhuninn-2.0`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Customize YouTube Caption Font | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description 把 YouTube CC 字幕變成粉圓體 `jf-openhuninn-2.0`(裝置內必須提前安裝此字體) | |
// @author You | |
// @match https://www.youtube.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
const fontFamily = '"jf-openhuninn-2.0"' | |
const css = ` | |
.ytp-caption-segment { | |
font-family: ${fontFamily} !important; | |
} | |
.caption-visual-line { | |
user-select: all; | |
} | |
` | |
const style = document.createElement('style') | |
document.head.appendChild(style) | |
style.type = 'text/css' | |
style.appendChild(document.createTextNode(css)) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/justfont/open-huninn-font/releases/tag/v2.0