Skip to content

Instantly share code, notes, and snippets.

@pgreze
Last active May 11, 2017 07:51
Show Gist options
  • Save pgreze/b255d0875c45eb095ce6ee5947784c91 to your computer and use it in GitHub Desktop.
Save pgreze/b255d0875c45eb095ce6ee5947784c91 to your computer and use it in GitHub Desktop.
Japanese websites scripts
// ==UserScript==
// @name Display pronounciation for all vocabulary
// @namespace https://www.japanesepod101.com/2007/05/24/lower-intermediate-25-tempura-tantrum/
// @version 0.1
// @description Display pronounciation for all vocabulary
// @license GNU Lesser General Public License (LGPL)
// @author pgreze
// @copyright pgreze, GNU Lesser General Public License (LGPL)
// @include https://japanesepod101.com/*
// @include https://www.japanesepod101.com/*
// ==/UserScript==
(function() {
'use strict';
document.querySelectorAll(".lsn3-lesson-vocabulary__pronunciation").forEach(function(e) { e.style.display = 'inline'; });
document.querySelectorAll(".lsn3-lesson-vocabulary__definition").forEach(function(e) { e.style.display = 'block'; });
document.querySelectorAll(".js-lsn3-vocabulary-examples").forEach(function(e) { e.style.display = 'inline'; });
})();
// ==UserScript==
// @name Renshu semicolon to comma
// @namespace http://jisho.org/
// @version 0.1
// @description Replace semicolon by comma in translations
// @license GNU Lesser General Public License (LGPL)
// @author pgreze
// @copyright pgreze, GNU Lesser General Public License (LGPL)
// @include http://jisho.org/search/*
// @include http://www.jisho.org/search/*
// ==/UserScript==
(function() {
'use strict';
// Get all meaning-meaning span nodes
var meanings = document.getElementsByClassName("meaning-meaning");
// Replace all ';' by ','
for (var meaning of meanings) {
meaning.textContent = meaning.textContent.split(';').join(',');
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment