Skip to content

Commit ca069e5

Browse files
committed
replace window.onload with $(document).ready()
1 parent 4e0a8a4 commit ca069e5

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

archive.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104

105105

106106
<script>
107-
window.onload = function(){ //避免爆代码
107+
$(document).ready(function(){ //避免爆代码
108108

109109
var click = 0; //初始化加载次数
110110
var paged = 1; //获取当前页数
@@ -207,7 +207,7 @@
207207
});
208208

209209

210-
}
210+
})
211211
</script>
212212

213213

index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979

8080

8181
<script>
82-
window.onload = function(){ //避免爆代码
82+
$(document).ready(function(){ //避免爆代码
8383

8484
var now = 20;
8585
var click = 0; //初始化加载次数
@@ -203,6 +203,6 @@
203203
});
204204

205205

206-
}
206+
})
207207
</script>
208208
<?php get_footer(); ?>

page.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353

5454
<script>
55-
window.onload = function(){ //避免爆代码
55+
$(document).ready(function(){ //避免爆代码
5656

5757

5858
var post_info = new Vue({ //axios获取顶部信息
@@ -86,7 +86,7 @@
8686
});
8787

8888

89-
}
89+
})
9090
</script>
9191

9292

single.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282

8383

8484
<script>
85-
window.onload = function() { //避免爆代码
85+
$(document).ready(function() { //避免爆代码
8686

8787

8888
var post_info = new Vue({ //axios获取顶部信息
@@ -217,7 +217,7 @@
217217
});
218218

219219

220-
}
220+
});
221221
</script>
222222

223223

style.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ Version: 4.3
1414
background-color: rgb(246, 247, 248) !important;
1515
background: rgb(246, 247, 248) !important;
1616
}
17+
html {
18+
-ms-overflow-style:none;
19+
overflow:-moz-scrollbars-none;
20+
}
21+
html::-webkit-scrollbar{width:0px}
1722
body {
1823
margin:0;
1924
background-color: rgb(246, 247, 248) !important;

0 commit comments

Comments
 (0)