File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 6868 const urlOrigin = location . origin ;
6969 const urlPath = location . pathname ;
7070 const urlHash = location . hash . replace ( '#' , '' ) ;
71+ const urlParams = new URLSearchParams ( window . location . search ) ;
7172 const config = {
7273 databaseURL : "https://webbit-remote.firebaseio.com/"
7374 } ;
105106 } , 1000 ) ;
106107 } ) ;
107108
109+ // 讀取 query string 中的參數
110+ urlParams . forEach ( ( value , key ) => {
111+ if ( key in list ) {
112+ list [ key ] = value ;
113+ }
114+ } ) ;
115+
108116 /* firebase 讀檔 */
109117 if ( urlHash ) {
110118 list = await database . ref ( urlHash ) . once ( 'value' ) . then ( result => {
Original file line number Diff line number Diff line change 6868 const urlOrigin = location . origin ;
6969 const urlPath = location . pathname ;
7070 const urlHash = location . hash . replace ( '#' , '' ) ;
71+ const urlParams = new URLSearchParams ( window . location . search ) ;
7172 const config = {
7273 databaseURL : "https://webbit-remote.firebaseio.com/"
7374 } ;
105106 } , 1000 ) ;
106107 } ) ;
107108
109+ // 讀取 query string 中的參數
110+ urlParams . forEach ( ( value , key ) => {
111+ if ( key in list ) {
112+ list [ key ] = value ;
113+ }
114+ } ) ;
115+
108116 /* firebase 讀檔 */
109117 if ( urlHash ) {
110118 list = await database . ref ( urlHash ) . once ( 'value' ) . then ( result => {
You can’t perform that action at this time.
0 commit comments