Greasy Fork is available in English.
去除W3Schools table “notranslate” css class
当前为
// ==UserScript==
// @name 去除W3Schools “notranslate”
// @namespace http://greasyfork.icu/users/37096/
// @homepage http://greasyfork.icu/scripts/33021/
// @supportURL http://greasyfork.icu/scripts/33021/feedback
// @version 1.1.3
// @description 去除W3Schools table “notranslate” css class
// @author zhouhaiboa
// @match https://www.w3schools.com/*/*.asp
// @match https://www.w3schools.com/*/*.asp*
// @icon https://www.w3schools.com/favicon.ico
// @require https://cdn.staticfile.org/jquery/3.5.1/jquery.min.js
// @compatible chrome
// @compatible firefox
// @compatible opera
// @license GNU GPLv3
// @grant GM_addStyle
// ==/UserScript==
(function() {
$("table").removeClass("notranslate");
$("table tr td a").addClass("notranslate");
$("table tr td:nth-child(1)").addClass("notranslate");
var ths = $("table tr th");
for(var i = 0;i<ths.length;i++) {
ths[i].onclick = function() {
var j = i+1;
var s = "table tr td:nth-child(" + j + ")";
$(j).toggleClass("notranslate");
};
alert(i);
}
})();