教程:恶意被举报?一个代码就能治它
投诉理由都在这里, 可你还是不知道自己为何被举报? 站长:好生气哦! 哥:惹不起那就躲! 站长:如果…我的页面不能在微信中打开就好了 哥:当然可以呀 现在哥就来教你,一个代码躲掉“微信内置浏览器”,也就是用如下文字引导你的用户使用手机浏览器访问。 1 复制代码 代码很长,但只需要你的“control+c”(直接复制) *{margin:0; padding:0;} img{max-width: 100%; height: auto;} .test{height: 600px; max-width: 600px; font-size: 40px;} function is_weixin() { var ua = navigator.userAgent.toLowerCase(); if (ua.match(/MicroMessenger/i) == "micromessenger") { return true; } else { return false; } } var isWeixin = is_weixin(); var winHeight = typeof window.innerHeight != 'undefined' ? window.innerHeight : document.documentElement.clientHeight; function loadHtml(){ var div = document.createElement('div'); div.id = 'weixin-tip'; div.innerHTML = ' document.body.appendChild(div); } function loadStyleText(cssText) { var style = document.createElement('style'); style.rel = 'stylesheet'; style.type = 'text/css'; try { style.appendChild(document.createTextNode(cssText)); } catch (e) { style.styleSheet.cssText = cssText; //ie9以下 } var head=document.getElementsByTagName("head")[0]; //head标签之间加上style样式 head.appendChild(style); } var cssText = "#weixin-tip{position: fixed; left:0; top:0; background: rgba(0,0,0,0.8); filter:alpha(opacity=80); width: 100%; height:100%; z-index: 999999;} #weixin-tip p{text-align: center; margin-top: 10%; padding:0 5%;}"; if(isWeixin){ loadHtml(); loadStyleText(cssText); } 2 快站后台操作 在页面添加JS组件,直接粘贴上述代码,保存并发布页面。 简简单单,就能躲掉找不到理由的被投诉了。';