MySubs Best Subtitle Highlighter

Highlights the most-voted subtitle per language on MySubs film pages. Works only for films!

安装此脚本
作者推荐脚本

您可能也喜欢GitHub Wide Markdown

安装此脚本
// ==UserScript==
// @name         MySubs Best Subtitle Highlighter
// @namespace    https://gf.qytechs.cn/users/1002054-igorskyflyer
// @version      v1.0.6
// @description  Highlights the most-voted subtitle per language on MySubs film pages. Works only for films!
// @author       igorskyflyer
// @date         2025-09-22
// @match        https://my-subs.co/film*
// @match        https://my-subs.com/film*
// @match        https://my-subs.net/film*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=my-subs.co
// @run-at       document-end
// @grant        none
// @license      GPL-3.0-or-later
// @compatible   chrome
// @compatible   firefox
// @compatible   opera
// @compatible   safari
// @compatible   edge
// @homepageURL  https://github.com/igorskyflyer/userscript-mysubs-best-subtitle-highlighter
// @supportURL   https://gf.qytechs.cn/scripts/549637/feedback
// ==/UserScript==

// @ts-nocheck

;(() => {
  const languages = document
    .querySelectorAll('.col-md-12')[1]
    .querySelectorAll('ul.list-group')

  for (let i = 0; i < languages.length; i++) {
    let max = -1
    let index = -1
    const entry = languages[i].querySelectorAll('a div.pull-right > b')

    for (let j = 0; j < entry.length; j++) {
      const count = +entry[j].textContent

      if (count > max) {
        max = count
        index = j
      }
    }

    languages[i].querySelectorAll('a')[index].style.background = '#198754'
    languages[i].querySelectorAll('a')[index].style.color = '#eee'
  }
})()

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址