Japanese Furigana and Ruby Tag Hider

Automatically hide ruby tags (used for Japanese Furigana) on text (small text above sentences), and show them with the mouse.

目前为 2017-11-16 提交的版本。查看 最新版本

// ==UserScript==
// @name        Japanese Furigana and Ruby Tag Hider
// @namespace   autoHideRubyKK
// @author      Kai Krause <[email protected]>
// @description Automatically hide ruby tags (used for Japanese Furigana) on text (small text above sentences), and show them with the mouse.
// @include	    *
// @version     1.2
// @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 taxg = document.createElement("style");
		tag.type = "text/css";
		document.getElementsByTagName("head")[0].appendChild(tag);
		tag[(typeof document.body.style.WebkitAppearance == "string") ? "innerText" : "innerHTML"] = newcss;
	}
}, false);