GravityTales CleanUp

Removes unnecessary elements from GravityTales to create a more pleasant reading experience.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         GravityTales CleanUp
// @namespace    http://gravitytales.com
// @include      http://gravitytales.com/novel/*
// @description  Removes unnecessary elements from GravityTales to create a more pleasant reading experience.
// @version      1.0.2
// @grant        none
// ==/UserScript==

function removeElementsByClass(className){
  var elements = document.getElementsByClassName(className);
  while(elements.length > 0){
    elements[0].parentNode.removeChild(elements[0]);
  }
}

function removeElementsByTag(tagName){
  var elements = document.getElementsByTagName(tagName);
  while(elements.length > 0){
    elements[0].parentNode.removeChild(elements[0]);
  }
}

removeElementsByClass('side-nav');
removeElementsByClass('header');
removeElementsByClass('comments');
removeElementsByClass('navbar');
removeElementsByTag('footer'); 

document.getElementsByClassName('main-content')[0].setAttribute('style', 'position:relative;left:15%;');
document.querySelector('head').innerHTML += '<style>.cc_banner{display:none;}</style>';

setTimeout(function(){ removeElementsByClass('cc_banner'); }, 1000);