Skip to content

Instantly share code, notes, and snippets.

@yrammos
Last active April 18, 2020 09:23
Show Gist options
  • Save yrammos/3ff8dcfd64526270c3d408613cdb81b8 to your computer and use it in GitHub Desktop.
Save yrammos/3ff8dcfd64526270c3d408613cdb81b8 to your computer and use it in GitHub Desktop.
Userscript for Sergey Lebedev's "English-Russian Music Dictionary" (http://eremus.celum.xyz/)
// ==UserScript==
// @name Англо-русский словарь музыкальных терминов (celum.xyz)
// @namespace http://tampermonkey.net/
// @match http://eremus.celum.xyz/*
// @grant GM_addStyle
// @version 1.0
// @author Yannis Rammos, Ph.D. (y@rammos.co)
// @description 1/26/2020, 11:55:13 AM
// ==/UserScript==
// Userscript effects:
// 1. Text magnification.
// 2. Linebreaks between definitions for improved lemma legibility.
let injectedCSS = GM_addStyle ( `
.main_text tr,
.main_text td {
font-size: 16px;
line-height: 2;
white-space:pre;
}
`);
(function() {
'use strict';
if (window.location.hostname === 'eremus.celum.xyz') {
for (let i = 0; i < document.getElementsByTagName('td').length; i++) {
document.getElementsByTagName('td')[i].innerHTML = document.getElementsByTagName('td')[i].innerHTML.replace(/; /g, "\n");
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment