Last active
August 14, 2020 02:46
-
-
Save chromia/4bfa2f154f8aaf4937478b6f86efc384 to your computer and use it in GitHub Desktop.
Django公式サイトのDOCUMENTATIONリンクをクリックしたときに、英語ではなく日本語文書に飛ぶようにするTamperMonkeyスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Always use Japanese for Django Docs | |
// @namespace chromia | |
// @version 0.1 | |
// @description replace link URL to Django Documentation(+ ja/) | |
// @author chromia<chromia@outlook.jp> | |
// @match https://www.djangoproject.com/* | |
// @match https://docs.djangoproject.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var elements = document.querySelectorAll(".container > div[role='navigation'] > ul > li:nth-child(3) > a"); | |
if(elements.length > 0){ | |
var link = elements[0]; | |
link.href += "ja/"; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment