gg__
at 2024-05-14 18:02:15 UTC
Solution: Write a UserScript
I realized I could solve this myself. In case someone else wants this feature, here's the code. I might expand this to more page types in the future, but this is enough for me for now.
// ==UserScript==
// @name jisho.org - page title enhancements
// @namespace Violentmonkey Scripts
// @match https://jisho.org/word/*
// @grant none
// @version 1.0
// @author gg__
// @description Make page titles on jisho.org more informative.
// ==/UserScript==
function getWord() {
const span = document.querySelector('.concept_light-representation .text')
if (span) {
return span.innerText
} else {
return undefined
}
}
function main() {
const title = document.querySelector('title')
const word = getWord()
if (word != undefined) {
const original = title.innerText
title.innerText = `${word} - ${original}`
}
}
main()
Log in to reply.
[REQUEST] Titles for Word Pages
I like how the search pages include the search term in the title of the page.
For example:
https://jisho.org/search/%E5%95%8F%20%23kanji
Has the title:
"問 #kanji - Jisho.org"
It would really be nice if the word pages could similarly include the word towards the front of the title.
Currently the title for:
https://jisho.org/word/%E9%83%BD%E5%90%88
is:
"Jisho.org: Japanese Dictionary".
It would be nice if it could be something like:
"都合 - Jisho.org: Japanese Dictionary".
What do you think?