Skip to content

Instantly share code, notes, and snippets.

@morkt
Last active May 17, 2017 09:50
Show Gist options
  • Save morkt/6ee1ce21719babd0df40a19adc429136 to your computer and use it in GitHub Desktop.
Save morkt/6ee1ce21719babd0df40a19adc429136 to your computer and use it in GitHub Desktop.
// ==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