Skip to content

Commit 310bfc1

Browse files
save file
1 parent 6b9831b commit 310bfc1

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

utils/misc/global-state-diff/v2.0/global-state-diff-v2.0.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ <h3>
347347

348348
var process = {};
349349
var setup = {};
350+
var kd = {};
350351

351352

352353
//:
@@ -361,7 +362,7 @@ <h3>
361362
$('#script .copy').onclick = e=>navigator.clipboard.writeText(src.value);
362363
$('#script .paste').onclick = async e=>{var txt=await navigator.clipboard.readText();src.value=txt};
363364

364-
src.onkeydown = e=>e.key=='Enter' && process.script(src.value);
365+
src.onkeydown = kd.src;
365366
src.onfocus = e=>src.select();
366367
src.focus();
367368

@@ -397,6 +398,18 @@ <h3>
397398
}//initdom
398399

399400

401+
//:
402+
403+
404+
kd.src = function(e){
405+
406+
if(e.key=='Enter'){
407+
process.script(src.value);
408+
}
409+
410+
}//src
411+
412+
400413
//:
401414

402415

0 commit comments

Comments
 (0)