錫蘭訂閱校正

讓錫蘭的訂閱數正確顯示

// ==UserScript==
// @name         錫蘭訂閱校正
// @namespace    https://em-tec.github.io/post/Ceylan-sub-fix
// @license MIT
// @version      0.3
// @description  讓錫蘭的訂閱數正確顯示
// @author       毛哥EM
// @match        *://www.youtube.com/*
// @match        *://m.youtube.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant        none
// ==/UserScript==

!function(){function e(){var e=document.getElementById("subscriber-count"),t=document.getElementById("channel-handle"),r=document.getElementById("text"),i=document.getElementById("owner-sub-count");if(e&&t){if(n.disconnect(),"@xilanceylan"==t.innerText){var c=e.innerText;if(c.indexOf("K")>-1)var a=parseInt(c.replace("K",""))/10+"T";else var a=c.replace("萬","兆").replace("万","兆");e.innerText=a}}else if(i&&r&&(n.disconnect(),"錫蘭Ceylan"==r.innerText)){var c=i.innerText,a=c.replace("萬","兆").replace("万","兆");i.innerText=a}}e(),window.addEventListener("popstate",e);var n=new MutationObserver(function(n){n.forEach(function(n){e()})});n.observe(document.body,{childList:!0,subtree:!0})}();