Greasy Fork

Letterboxd Formated Runtime

Replaces the original runtime with a formated one

当前为 2024-09-07 提交的版本,查看 最新版本

// ==UserScript==
// @name        Letterboxd Formated Runtime
// @namespace   https://github.com/Tetrax-10
// @description Replaces the original runtime with a formated one
// @icon        https://raw.githubusercontent.com/worldwidewaves/letterboxd-scripts/master/img/letterboxd_icon.png
// @license     MIT
// @version     1.0
// @match        *://*.letterboxd.com/film/*
// ==/UserScript==

(() => {
    const runtime = document.querySelector(".text-footer-extra.duration-extra[data-original-title]")
    const formatedRuntime = runtime.dataset.originalTitle ?? ""

    if (formatedRuntime) {
        runtime.innerText = `${formatedRuntime} / ${runtime.innerText}`
    }
})()