Last active
October 22, 2022 00:26
-
-
Save tkdn/fbbbc943da0e18a89a2cda3784e6d2f7 to your computer and use it in GitHub Desktop.
React Doc 英語版から日本語に移動するリンクを追加
This file contains hidden or 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 出、出~反応取説日本語版転送奴〜 | |
// @namespace https://gist.github.com/tkdn/fbbbc943da0e18a89a2cda3784e6d2f7#file-react-doc-transfer-to-ja-user-js | |
// @updateURL https://gist.github.com/tkdn/fbbbc943da0e18a89a2cda3784e6d2f7/raw/6ee1f979f4f8dee68f2d367c5301934fb3abf2bc/react-doc-transfer-to-ja.user.js | |
// @downloadURL https://gist.github.com/tkdn/fbbbc943da0e18a89a2cda3784e6d2f7/raw/6ee1f979f4f8dee68f2d367c5301934fb3abf2bc/react-doc-transfer-to-ja.user.js | |
// @version 0.1 | |
// @description React Doc 英語版から日本語に移動するリンクを追加 | |
// @author tkdn <[email protected]> | |
// @match https://reactjs.org/*/* | |
// @grant none | |
// ==/UserScript== | |
(() => { | |
console.log('出、出~反応取説日本語版転送奴〜') | |
const { host, pathname } = new URL(location.href) | |
if (host !== 'reactjs.org') { | |
return | |
} | |
const link = document.createElement('a') | |
link.style.cssText = 'background-color: #333; color: #61dafb; position: fixed; height: 1.2em; bottom: .2em; left: .2em; padding: .1em;' | |
link.href = `https://ja.reactjs.org${pathname}` | |
link.innerHTML = 'to: Ja' | |
document.body.appendChild(link) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment