Last active
May 22, 2018 01:16
-
-
Save komeda-shinji/e9f73d636c680df7c4b927d0fd86259b to your computer and use it in GitHub Desktop.
JAWS-UG CLI 専門支部のハンズオンテキストのコマンド部分をワンクリックでコピー可能にするブックマークレット
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
javascript:(function(){ var p = window.document.getElementsByTagName("pre"); for (var i = 0; i < p.length; i++) { var pre = p[i]; pre.onclick = function() { document.execCommand("copy"); }; pre.addEventListener("copy", function(event) { event.preventDefault(); if (event.clipboardData) { event.clipboardData.setData("text/plain", event.target.textContent); event.target.style.backgroundColor = "#a0a0ff"; window.setTimeout(function(){ event.target.style.backgroundColor = "#f0f0f0"; }, 500); } } ); } })() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment