Created
June 26, 2013 19:13
-
-
Save vietqhoang/5870553 to your computer and use it in GitHub Desktop.
Change font-weight for all attribute lang-ja in the document. Use with a script injector extension, such as Tampermonkey for Chrome or GreaseMonkey for Firefox.
This file contains hidden or 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== | |
| // @name KanaEagleVision | |
| // @namespace http://www.wanikani.com | |
| // @version 0.1 | |
| // @description Changes font-weight to normal for anything attributed with lang=ja. jQuery inject script from https://gist.github.com/eristoddle/4440713 | |
| // ==/UserScript== | |
| function addJQuery(callback) { | |
| var script = document.createElement("script"); | |
| script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"); | |
| script.addEventListener('load', function() { | |
| var script = document.createElement("script"); | |
| script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();"; | |
| document.body.appendChild(script); | |
| }, false); | |
| document.body.appendChild(script); | |
| } | |
| function fontWeightChange(){ | |
| $(document).ready(function() { | |
| $('[lang=ja]').css('font-weight', 'normal'); | |
| }); | |
| } | |
| // load jQuery and execute the main function | |
| addJQuery(fontWeightChange); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment