Last active
May 17, 2017 09:50
-
-
Save morkt/6ee1ce21719babd0df40a19adc429136 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== | |
// @name vndb-jp-titles | |
// @namespace https://vndb.org | |
// @description Search results in Japanese on VNDB | |
// @include https://vndb.org/v/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
var div = window.byClass('div', 'vnbrowse'); | |
var table = window.byName(div[0], 'table'); | |
var tbody = window.byName(table[0], 'tbody'); | |
titles = window.byClass(tbody[0], 'td', 'tc1'); | |
for (var i = 0; i < titles.length; ++i) { | |
var a = window.byName(titles[i], 'a')[0]; | |
var jp = a.getAttribute('title'); | |
var en = a.textContent; | |
a.setAttribute('title', en); | |
a.textContent = jp; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment