// ==UserScript== // @name Bunpro Toolbox // @version 1.0.31 // @description Adds various search options from Japanese resources // @author Ambo100 // @match *bunpro.jp/grammar_points/* // @grant none // @namespace https://greasyfork.org/users/230700 // @downloadURL none // ==/UserScript== (function() { 'use strict'; var grammarPoint = document.getElementsByClassName("meaning__japanese")[0].innerText; var toolboxDiv; AddToolbox(); //TOOKBOX LINKS START AddLink("Jisho", "https://jisho.org/search/"); AddLink("Wikitionary", "https://en.wiktionary.org/wiki/","#Japanese"); AddLink("Stack Exchange", "https://japanese.stackexchange.com/search?q=",""); AddLink("Eijirou", "https://eow.alc.co.jp/search?q=",""); AddLink("YouGlish", "https://youglish.com/pronounce/","/japanese?"); AddLink("YouTube", "https://www.youtube.com/results?search_query=","+Japanese"); //TOOLBOX LINKS END function AddToolbox() { var grammarDiv = document.getElementsByClassName("section")[0]; toolboxDiv = document.createElement("div"); grammarDiv.append(toolboxDiv); toolboxDiv.classList.add('related-grammar__holder'); toolboxDiv.style.marginBottom = "0px"; toolboxDiv.style.paddingBottom = "25px"; } function AddLink(linkName, urlPrefix = '', urlSuffix = '') { toolboxDiv.innerHTML += '' + linkName + ''; } } )();