Last active
March 7, 2018 03:27
-
-
Save kawamurayuto/9e0e69bbca1b35a4425386fbb49ccea0 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
| javascript:(function(){for(var a,b="0".charCodeAt(),c="z".charCodeAt(),d="",e=0;10>e;e+=1)d+=String.fromCharCode(b+(Math.random()*(c-b)|0));a=d;var f=document.createElement("span");f.style.opacity=0;f.textContent=a;document.body.appendChild(f);var g=document.createRange();g.selectNode(f);getSelection().removeAllRanges();getSelection().addRange(g);document.execCommand("copy");document.body.removeChild(f); | |
| alert("\u4ee5\u4e0b\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3057\u305f\u3002\n\n"+a);})() |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
中身はこんな感じ。