Skip to content

Commit b84b3da

Browse files
committed
event
1 parent 99dc98d commit b84b3da

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Writerside/cfg/head-script.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,19 @@
4343

4444
/*横向广告*/
4545
if (/Mobi|Android|iPhone/i.test(navigator.userAgent)) {
46+
alert('移动端?');
4647
// 当前设备是移动设备
4748
// https://www.ruanyifeng.com/blog/2021/09/detecting-mobile-browser.html
48-
window.onload=(event)=>{
49-
_addIns(() => {
49+
window.addEventListener('load',(event) => {
50+
_addIns(() => {
5051
_pushAd('after ins append.');
5152
});
52-
};
53+
});
54+
//window.onload=(event)=>{
55+
// _addIns(() => {
56+
// _pushAd('after ins append.');
57+
// });
58+
//};
5359
} else {
5460
document.addEventListener("DOMContentLoaded", (event) => {
5561
try {

0 commit comments

Comments
 (0)