@@ -877,59 +877,28 @@ class Commands {
877
877
} ,
878
878
879
879
{
880
- id : "open-html -on-window" ,
880
+ id : "open-external-website -on-window" ,
881
881
fn : async function ( ) {
882
+ let payload = await ilse . dialog . input ( "Query" , "Type:" )
883
+ let full_path = payload . input
884
+ create_window ( { title : `${ full_path } (Website)` , external : true , url : full_path } )
885
+ } ,
886
+ description : "Will open a new query windows based on your choice(External)." ,
887
+ name : "Open External Website" ,
888
+ props : { } ,
889
+ } ,
882
890
883
- // let payload = await ilse.dialog.input( "Query", "Type:" )
884
- // printf( "payload -> ", payload )
885
- // let name = payload.input
886
- // printf( "name -> ", name )
887
- // let file = ilse.filesystem.file.read.sync( name + ".html" )
888
- // printf( "file -> ", file )
889
-
890
- // create_window({ title: name + ".html", html: file })
891
- // create_window({ title: "Vim", url: `app://${ilse.target_directories[0]}/vim/index.html` })
892
-
893
- // let payload = await ilse.dialog.input( "Query", "Type:" )
894
- // let full_path = payload.input
895
-
896
- // let file = ilse.filesystem.file.read.sync( full_path + ".html" )
897
- // printf( "file -> ", file )
898
- // let html = file
899
- // window.open( get_target_directory_url() + "iframe.html" )
900
- // let o = window.open(get_target_directory_url(), "lll", "popup");
901
- // printf( "o -> ", o )
902
-
903
- // const windowFeatures = "left=100,top=100,width=320,height=320";
904
- // const handle = window.open( get_target_directory_url() + "iframe.html", "mozillaWindow", windowFeatures);
905
- // printf( "handle -> ", handle )
906
- // printf( "html.documentElement -> ", handle.documentElement )
907
-
908
- // let html = html_to_string( handle )
909
- // printf( "html -> ", html )
910
-
891
+ {
892
+ id : "open-html-on-window" ,
893
+ fn : async function ( ) {
911
894
912
895
let payload = await ilse . dialog . input ( "Query" , "Type:" )
913
896
let full_path = payload . input
914
897
create_window ( { title : `${ full_path } (HTML)` , url : full_path } )
915
898
916
- /*
917
- setTimeout( () => {
918
- printf( "window.frames -> ", window.frames )
919
- let frame = window.frames['ll']
920
- printf( "frame -> ", frame )
921
- frame.contentWindow.postMessage({ number: "LLL" } )
922
- printf( "frame.contentWindow -> ", frame.contentWindow )
923
- printf( "frame.document -> ", frame.document )
924
- printf( "frame.document.body -> ", frame.document.body )
925
- printf( "frame.document.body.innerHTML -> ", frame.document.body.innerHTML )
926
- }, 1000 )
927
- */
928
- // create_window({ title: "Component", url: `app://${ilse.target_directories[0]}/${full_path}.html` })
929
-
930
899
} ,
931
900
description : "Will open a new query windows based on your choice." ,
932
- name : "Open new Query " ,
901
+ name : "Open HTML " ,
933
902
props : { } ,
934
903
} ,
935
904
0 commit comments