File tree Expand file tree Collapse file tree 2 files changed +6
-20
lines changed Expand file tree Collapse file tree 2 files changed +6
-20
lines changed Original file line number Diff line number Diff line change 379379 }
380380
381381 // 處理中間圖片跟隨視窗大小移動位置
382- window . onresize = function ( ) {
383- watchChangeSize ( ) ;
384- }
385-
386- function watchChangeSize ( ) {
387- const offsetWidth = document . documentElement . clientWidth ;
388- if ( offsetWidth ) {
389- location . reload ( ) ;
390- }
391- }
382+ window . addEventListener ( 'resize' , ( ) => {
383+ document . documentElement . clientWidth = location . reload ( ) ;
384+ } ) ;
392385
393386} ( ) ;
Original file line number Diff line number Diff line change 379379 }
380380
381381 // 處理中間圖片跟隨視窗大小移動位置
382- window . onresize = function ( ) {
383- watchChangeSize ( ) ;
384- }
385-
386- function watchChangeSize ( ) {
387- const offsetWidth = document . documentElement . clientWidth ;
388- if ( offsetWidth ) {
389- location . reload ( ) ;
390- }
391- }
382+ window . addEventListener ( 'resize' , ( ) => {
383+ document . documentElement . clientWidth = location . reload ( ) ;
384+ } ) ;
392385
393386} ( ) ;
You can’t perform that action at this time.
0 commit comments