Created
April 15, 2015 04:53
-
-
Save ShingoFukuyama/321efc34628ee8ae07f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* UserScript for Ohajiki Web Browser | |
* 全サイトを黒背景に白文字 | |
* 設定>ユーザスクリプトの編集>読み込み前 に以下をコピペ | |
*/ | |
var blackAndWhite = 1; // 0: 無効, 1: 有効 | |
if (blackAndWhite) {(function(d){var ohjBW = d.getElementById('ohjBW');if (ohjBW) {ohjBW.parentNode.removeChild(ohjBW);return;}var css = d.createElement('style'),rule = d.createTextNode('*{background-color:#111 !important; color:#eee !important;} a:visited { color:#aaf !important; } a{ color:#acf !important; }a, span{background-color:transparent !important;}');css.type = 'text/css';css.id = 'ohjBW';if (css.styleSheet) {css.styleSheet.cssText = rule.nodeValue;} else {css.appendChild(rule);};d.getElementsByTagName('html')[0].appendChild(css);})(document);} | |
/* | |
* カスタムボタンで元のスタイルに戻したい場合 | |
* 設定>ボタンのカスタマイズ>任意のボタンをタップ | |
* 以下のスクリプトをボタンに登録 | |
* スタイルの適用/削除が交互に行えます | |
*/ | |
// (function(d){var ohjBW = d.getElementById('ohjBW');if (ohjBW) {ohjBW.parentNode.removeChild(ohjBW);return;}var css = d.createElement('style'),rule = d.createTextNode('*{background-color:#111 !important; color:#eee !important;} a:visited { color:#aaf !important; } a{ color:#acf !important; }a, span{background-color:transparent !important;}');css.type = 'text/css';css.id = 'ohjBW';if (css.styleSheet) {css.styleSheet.cssText = rule.nodeValue;} else {css.appendChild(rule);};d.getElementsByTagName('html')[0].appendChild(css);})(document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment