Hitomi 언어설정

-

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name              Hitomi 언어설정
// @description       -

// @namespace         -
// @version           2026.07.20.22.12
// @icon              https://t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://hitomi.la
// @match             https://*.la/*

// @grant             GM.getValue
// @grant             GM.setValue
// @grant             GM_registerMenuCommand
// ==/UserScript==
if (window.location.hostname === 'hitomi.la') {
(async () => {
(await GM.getValue('custom') == undefined) ? GM.setValue('custom', '') : await GM.getValue('custom')
let cst = (await GM.getValue('custom') || '').toLowerCase()
  , set = _ => {GM.setValue('custom', window.prompt('Type your language',)); window.location.reload()}
  , nav = {id:'indonesian',ca:'catalan',cs:'czech',da:'danish',de:'german',et:'estonian',en:'english',es:'spanish',eo:'esperanto',fr:'french',
           hi:'hindi',it:'italian',hu:'hungarian',nl:'dutch',nb:'norwegian',pl:'polish',pt:'portuguese',ro:'romanian',sq:'albanian',sk:'slovak',
           sr:'serbian',fi:'finnish',sv:'swedish',tl:'tagalog',vi:'vietnamese',tr:'turkish',el:'greek',bg:'bulgarian',mn:'mongolian',ru:'russian',
           uk:'ukrainian',he:'hebrew',ar:'arabic',th:'thai',ko:'korean',zh:'chinese',ja:'japanese'}
  , txt = (cst == '') ? nav[window.navigator.language.substring(0,2)] : cst
  , mov = _ => {window.location = window.location.toString().replace(/-all\./, `-${txt}\.`)}
  , tar = document.querySelector('#lang > a')

document.querySelector('#logo > a')?.setAttribute('href', `https://hitomi.la/index-${txt}.html`);
if (document.URL.indexOf(`-${txt}\.`) > -1) {
    window.onpopstate = _ => history.go(-2)
    history.pushState({}, '')
}
if (document.URL.indexOf('-all.html') > -1) mov()
if (tar) {
    tar.href = `https://hitomi.la/index-${txt}.html`
    tar.innerHTML = `${txt}<img src="//ltn.gold-usergeneratedcontent.net/down-arrow.png">`
    tar.style.cssText = 'padding: 0 10px; width: 150px; display: inline-block'}
GM_registerMenuCommand('Set your language', set)
})()
}