缺B乐

将 AcFun 站名替换为更为合适的 缺B乐。

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        缺B乐
// @description 将 AcFun 站名替换为更为合适的 缺B乐。
// @namespace   org.sorz.lab.queble
// @include     http://www.acfun.tv/*
// @version     1
// @grant       none
// ==/UserScript==

String.prototype.correct = function () {
  return this.toString()
           .replace(/AcFun/gi, '缺B乐')
           .replace(/\bAC\b/g, '缺B');
}

function correctText() {
   var $this = $(this);
    $this.text($this.text().correct());
}

$(document).ready(function () {
  document.title = document.title.correct();
  $('.title').each(correctText);
  $('a.tag').each(correctText);
  $('h1').each(correctText);
  $('h2').each(correctText);
  $('#footer-inner').find('a').each(correctText);
  $('.bottom-footer').find('p').each(correctText);
});