Last active
February 10, 2023 06:42
-
-
Save tkdn/26f5beb115a29f05460d7406bd8fc158 to your computer and use it in GitHub Desktop.
出、出〜鉄道文書和訳輪付奴〜
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/26f5beb115a29f05460d7406bd8fc158#file-rails-doc-transfer-to-ja-user-js | |
// @updateURL https://gist.github.com/tkdn/26f5beb115a29f05460d7406bd8fc158/raw/0ca538e290d376f758dfb8ac4edae34bdfd059d7/rails-doc-transfer-to-ja.user.js | |
// @downloadURL https://gist.github.com/tkdn/26f5beb115a29f05460d7406bd8fc158/raw/0ca538e290d376f758dfb8ac4edae34bdfd059d7/rails-doc-transfer-to-ja.user.js | |
// @version 0.1 | |
// @description Rails Doc 英語版から日本語に移動するリンクを追加 | |
// @author tkdn <[email protected]> | |
// @grant none | |
// ==/UserScript== | |
(() => { | |
console.log('出、出〜鉄道文書和訳輪付奴〜') | |
const { host, pathname, hash } = new URL(location.href) | |
if (host !== 'guides.rubyonrails.org') { | |
return | |
} | |
const link = document.createElement('a') | |
link.style.cssText = 'background-color: #ff0a00; color: #61dafb; position: fixed; height: 1.2em; bottom: .2em; left: .2em; padding: .1em; font-weight: bold; font-size: 1.4em;' | |
link.href = `https://railsguides.jp/${pathname}${hash}` | |
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