Skip to content

Commit eceaf24

Browse files
save file
1 parent 85f7bc2 commit eceaf24

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

utils/editors/js-console/v2.0/js-console-v2.0.html

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@
139139
initdom(document.body);
140140

141141

142+
publish.query();
143+
144+
142145
}//init
143146

144147

@@ -414,7 +417,6 @@
414417

415418

416419

417-
publish.query();
418420
editor.focus();
419421

420422
query();
@@ -640,7 +642,7 @@
640642

641643

642644
function complete(file){
643-
console.log('complete',file);
645+
//console.log('complete',file);
644646
if(file){
645647
editor.filename(file);
646648
editor.filename.save.hide();
@@ -783,20 +785,16 @@
783785

784786

785787
function run(){
786-
788+
debug('run');
787789
if(autosave.checked){
788-
console.log('save');
790+
debug('autosave');
789791
filemod.save();
790792
}
791793

792794

793795
var js = editor.getValue();
794796

795-
//if(mode.iframe.checked){
796-
output.run.iframe2(js,{async:mode.async.checked});
797-
//}else{
798-
//output.run(js,{async:mode.async.checked});
799-
//}
797+
output.run.iframe2(js,{async:mode.async.checked});
800798

801799

802800
}//run
@@ -870,6 +868,21 @@
870868
}//favicon
871869

872870

871+
//:
872+
873+
874+
function debug(...args){
875+
876+
if(!df && !obj.df)return;
877+
args.unshift(`[ ${did} ]`);
878+
var fmt = Array.from({length:args.length}).fill('%O').join(' ');
879+
var args2 = [fmt].concat(args);
880+
console.groupCollapsed.apply(console,args2);
881+
console.trace();
882+
console.groupEnd();
883+
884+
}//debug
885+
873886

874887

875888
</script>

0 commit comments

Comments
 (0)