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 379
379
}
380
380
381
381
// 處理中間圖片跟隨視窗大小移動位置
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
+ } ) ;
392
385
393
386
} ( ) ;
Original file line number Diff line number Diff line change 379
379
}
380
380
381
381
// 處理中間圖片跟隨視窗大小移動位置
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
+ } ) ;
392
385
393
386
} ( ) ;
You can’t perform that action at this time.
0 commit comments