CtgoFx

Remove ads and white spaces.

目前为 2023-12-25 提交的版本。查看 最新版本

// ==UserScript==
// @name        CtgoFx
// @author      Itsuki
// @version     0.11
// @match       https://*.chatango.com/*
// @description Remove ads and white spaces.
// @license     WTFPL
// @namespace   https://greasyfork.org/en/users/6316-itsuki
// @homepageURL https://greasyfork.org/en/scripts/6004-ctgofx
// @grant       GM_addStyle
// @grant       GM_getResourceText
// @resource    CSS https://userstyles.world/api/style/4560.user.css
// ==/UserScript==

// Load style sheet
const cssSrc = GM_getResourceText("CSS");
GM_addStyle(cssSrc);

function fcol() {
  const cols = document.getElementsByTagName("col");
  if (cols.length > 1) {
    cols[1].style.display = "none";
  }

  const colGroups = document.getElementsByTagName("colgroup");
  if (colGroups.length > 0) {
    colGroups[0].style.display = "none";
  }

  const embeds = document.getElementsByTagName("embed");
  for (let i = 0; i < embeds.length; i++) {
    embeds[i].style.height = "100%";
    embeds[i].style.width = "100%";
  }
}

try {
  fcol();
} catch (err) {
  console.log(err);
}