NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Custom Dictionry - Template
// @version 0.0.1
// @description Custom Translation Dictionary Template
// @author mwalcott3
// @include *://*.uukanshu.com/b/*/*
// @grant none
// @license MIT; https://opensource.org/licenses/MIT
// ==/UserScript==
(function() {
'use strict';
//Changes per site/book
let content = document.getElementById('contentbox');
let dictionary = {
'chinese': 'english',
};
//Stays the same
let pattern = new RegExp(Object.keys(dictionary).join('|'), 'g');
content.innerHTML = content.innerHTML.replace(pattern, (match) => {
return dictionary[match];
});
})();