Skip to content

Commit f58dfa4

Browse files
committed
手机不配?
1 parent b84b3da commit f58dfa4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Writerside/cfg/head-script.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,18 @@
4343

4444
/*横向广告*/
4545
if (/Mobi|Android|iPhone/i.test(navigator.userAgent)) {
46-
alert('移动端?');
4746
// 当前设备是移动设备
4847
// https://www.ruanyifeng.com/blog/2021/09/detecting-mobile-browser.html
48+
try {
4949
window.addEventListener('load',(event) => {
5050
_addIns(() => {
5151
_pushAd('after ins append.');
5252
});
5353
});
54+
} catch (e) {
55+
console.log('add event load failed.', e);
56+
alert('移动端 err: ' + e);
57+
}
5458
//window.onload=(event)=>{
5559
// _addIns(() => {
5660
// _pushAd('after ins append.');

0 commit comments

Comments
 (0)