Changeset 67 for branches/testa-single-bookmark/js/main.js
- Timestamp:
- Sep 5, 2019 9:42:27 AM (6 years ago)
- File:
-
- 1 edited
-
branches/testa-single-bookmark/js/main.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/testa-single-bookmark/js/main.js
r66 r67 45 45 } 46 46 47 function set_output_url_listx(text){ 48 if( text.match( /{.*}/ ) !== null ){ 49 const obj = JSON.parse( text ) 50 //console.log("update_all_info_on_host text=" + text ) 51 Globalx.output_url_listx = {} 52 obj["htmlfname"].forEach( (item) => { 53 let words = item.full.split('.') 54 let base = words[0] 55 Globalx.output_url_listx[ base ] = {} 56 Globalx.output_url_listx[ base ].full = `${obj["output_url"]}/${item.full}` 57 Globalx.output_url_listx[ base ].partial = `${obj["output_url"]}/${item.partial}` 58 console.log(`${words[0].full}=${ Globalx.output_url_listx[ base ].full }`) 59 console.log(`${words[0].partial}=${ Globalx.output_url_listx[ base ].partial }`) 60 } ) 61 Globalx.storagex.save_as_info_from_globalx() 62 } 63 } 64 47 65 async function update_all_info_on_host_async( ) { 48 await Globalx.remotex.get_output_url_listx( Globalx.num , (text) => { 49 if( text.match( /{.*}/ ) !== null ){ 50 const obj = JSON.parse( text ) 51 //console.log("update_all_info_on_host text=" + text ) 52 Globalx.output_url_listx = obj 53 Globalx.storagex.save_as_info_from_globalx() 54 } 66 await Globalx.remotex.update_output_url_listx( Globalx.num , (text) => { 67 set_output_url_listx(text) 55 68 } ) 56 69 … … 86 99 async function get_output_url_listx_async( num ) { 87 100 await Globalx.remotex.get_output_url_listx( num , (text) => { 88 if( text.match( /{.*}/ ) !== null ){ 89 const obj = JSON.parse( text ) 90 //console.log("update_all_info_on_host text=" + text ) 91 Globalx.output_url_listx = obj 92 Globalx.storagex.save_as_info_from_globalx() 93 } 101 set_output_url_listx(text) 94 102 } ) 95 103 } 104 96 105 async function setup(){ 97 106 await get_output_url_listx_async( Globalx.num ) 98 await get_output_url( Globalx.num )107 // await get_output_url( Globalx.num ) 99 108 } 100 109
Note: See TracChangeset
for help on using the changeset viewer.
![(trac.ini の [header_logo] セクションを設定してください)](/python/trac/Flist/chrome/common/trac_logo_mini.png)