以下のような手作業の工程が面倒くさい、と思った。
- JavaScriptのソースを作る ← これは良い
- ソースをクリップボードにコピーする ←↓ここからがダルい
- 目的のサイトなどを開く
- コンソールを開く
- ソースをペーストする
- 実行する
| let script_sigma = document.createElement('script'); | |
| script_sigma.src = 'https://cdnjs.cloudflare.com/ajax/libs/sigma.js/1.2.0/sigma.min.js'; | |
| document.body.appendChild(script_sigma); | |
| /*-------------------------------------- | |
| 安価グラフを作る | |
| --------------------------------------*/ | |
| let f = function () { |
| (function() { | |
| const show = (x) => { | |
| console.log(x); | |
| }; | |
| //総和 | |
| var arr = [1, 3, 5, 7, 9]; | |
| show(arr.reduce((x, y) => x + y)); | |
| //最大値 |
以下は、おーぷん2ちゃんねるのread.cgi配下のconsoleにて実行すると 新着レスが自動更新されるたびに、更新で追加されたdl要素を出力する
| function searchUnicode(strs){ | |
| let charcodes = strs.split("").map((s) => {return s.charCodeAt();}); | |
| let charhex = charcodes.map((s) => {return s.toString(16);}); | |
| for(let ix = 0, len = charcodes.length; ix < len; ix++){ | |
| console.log(`${strs[ix]} = ${charcodes[ix]}(U+${charhex[ix]}): http://www.fileformat.info/info/unicode/char/${charhex[ix]}/index.htm`); | |
| } | |
| return [charcodes, charhex]; | |
| } |
| (function(exports) { | |
| let abrowzer = exports.abrowzer || {}; | |
| abrowzer.suredecomposer = function() { | |
| class DX { | |
| constructor() { | |
| this.init(); | |
| } | |
| getDX() { | |
| let d = document; |