Automatically Hide Ruby-based Furigana

Such as to hide Furigana on Japanese text (the small-print above sentences)

目前為 2016-05-22 提交的版本,檢視 最新版本

// ==UserScript==
// @name        Automatically Hide Ruby-based Furigana
// @namespace   autoHideRubyKK
// @description Such as to hide Furigana on Japanese text (the small-print above sentences)
// @include	*
// @version     1.1
// @grant       none
// ==/UserScript==

window.addEventListener('load', function() {
	var newcss = "ruby rt{ visibility:hidden; } ruby:hover rt{ visibility:visible; }";
	if ("\v" == "v") {
		document.createStyleSheet().cssText = newcss;
	} else {
		var tag = document.createElement("style");
		tag.type = "text/css";
		document.getElementsByTagName("head")[0].appendChild(tag);
		tag[(typeof document.body.style.WebkitAppearance == "string") ? "innerText" : "innerHTML"] = newcss;
	}
}, false);