php跳出微信默认浏览器打开网页,求助,跳出微信内置浏览器直接到默认浏览器代码...
[Asm] 纯文本查看 复制代码
请用浏览器访问
#weixinStyle{ width:100%; display:none; text-align:center; font-size:16px; padding-top:50px;}
if(!/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){
window.location.href="/music/index.php";//完整路径
}
doAdblock();
function doAdblock(){
(function() {
function A() {}
A.prototype = {
rules: {
'17173_in':{
'find':/http:\/\/f\.v\.17173cdn\.com\/(\d+\/)?flash\/PreloaderFile(Customer)?\.swf/,
'replace':"http://swf.adtchrome.com/17173_in_20150522.swf"
},
'17173_out':{
'find':/http:\/\/f\.v\.17173cdn\.com\/(\d+\/)?flash\/PreloaderFileFirstpage\.swf/,
'replace':"http://swf.adtchrome.com/17173_out_20150522.swf"
},
'17173_live':{
'find':/http:\/\/f\.v\.17173cdn\.com\/(\d+\/)?flash\/Player_stream(_firstpage)?\.swf/,
'replace':"http://swf.adtchrome.com/17173_stream_20150522.swf"
},
'17173_live_out':{
'find':/http:\/\/f\.v\.17173cdn\.com\/(\d+\/)?flash\/Player_stream_(custom)?Out\.swf/,
'replace':"http://swf.adtchrome.com/17173.out.Live.swf"
}
},
_done: null,
get done() {
if(!this._done) {
this._done = new Array();
}
return this._done;
},
addAnimations: function() {
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = 'object,embed{\
-webkit-animation-duration:.001s;-webkit-animation-name:playerInserted;\
-ms-animation-duration:.001s;-ms-animation-name:playerInserted;\
-o-animation-duration:.001s;-o-animation-name:playerInserted;\
animation-duration:.001s;animation-name:playerInserted;}\
@-webkit-keyframes playerInserted{from{opacity:0.99;}to{opacity:1;}}\
@-ms-keyframes playerInserted{from{opacity:0.99;}to{opacity:1;}}\
@-o-keyframes playerInserted{from{opacity:0.99;}to{opacity:1;}}\
@keyframes playerInserted{from{opacity:0.99;}to{opacity:1;}}';
document.getElementsByTagName('head')[0].appendChild(style);
},
animationsHandler: function(e) {
if(e.animationName === 'playerInserted') {
this.replace(e.target);
}
},
replace: function(elem) {
if(this.done.indexOf(elem) != -1) return;
this.done.push(elem);
var player = elem.data || elem.src;
if(!player) return;
var i, find, replace = false;
for(i in this.rules) {
find = this.rules[i]['find'];
if(find.test(player)) {
replace = this.rules[i]['replace'];
if('function' === typeof this.rules[i]['preHandle']) {
this.rules[i]['preHandle'].bind(this, elem, find, replace, player)();
}else{
this.reallyReplace.bind(this, elem, find, replace)();
}
break;
}
}
},
reallyReplace: function(elem, find, replace) {
elem.data && (elem.data = elem.data.replace(find, replace)) || elem.src && ((elem.src = elem.src.replace(find, replace)) && (elem.style.display = 'block'));
var b = elem.querySelector("param[name='movie']");
this.reloadPlugin(elem);
},
reloadPlugin: function(elem) {
var nextSibling = elem.nextSibling;
var parentNode = elem.parentNode;
parentNode.removeChild(elem);
var newElem = elem.cloneNode(true);
this.done.push(newElem);
if(nextSibling) {
parentNode.insertBefore(newElem, nextSibling);
} else {
parentNode.appendChild(newElem);
}
},
init: function() {
var handler = this.animationsHandler.bind(this);
document.body.addEventListener('webkitAnimationStart', handler, false);
document.body.addEventListener('msAnimationStart', handler, false);
document.body.addEventListener('oAnimationStart', handler, false);
document.body.addEventListener('animationstart', handler, false);
this.addAnimations();
}
};
new A().init();
})();
}
//remove baidu search ad
if(document.URL.indexOf('www.baidu.com') >= 0){
if(document && document.getElementsByTagName && document.getElementById && document.body){
var aa = function(){
var all = document.body.querySelectorAll("#content_left div,#content_left table");
for(var i = 0; i < all.length; i++){
if(/display:\s?(table|block)\s!important/.test(all[i].getAttribute("style"))){all[i].style.display= "none";all[i].style.visibility='hidden';}
}
all = document.body.querySelectorAll('.result.c-container[id="1"]');
//if(all.length == 1) return;
for(var i = 0; i < all.length; i++){
if(all[i].innerHTML && all[i].innerHTML.indexOf('广告')>-1){
all[i].style.display= "none";all[i].style.visibility='hidden';
}
}
}
aa();
document.getElementById('wrapper_wrapper').addEventListener('DOMSubtreeModified',aa)
};
}
//remove sohu video ad
if (document.URL.indexOf("tv.sohu.com") >= 0){
if (document.cookie.indexOf("fee_status=true")==-1){document.cookie='fee_status=true'};
}
//remove 56.com video ad
if (document.URL.indexOf("56.com") >= 0){
if (document.cookie.indexOf("fee_status=true")==-1){document.cookie='fee_status=true'};
}
//fore iqiyi enable html5 player function
if (document.URL.indexOf("iqiyi.com") >= 0){
if (document.cookie.indexOf("player_forcedType=h5_VOD")==-1){
document.cookie='player_forcedType=h5_VOD'
if(localStorage.reloadTime && Date.now() - parseInt(localStorage.reloadTime)<60000){
console.log('no reload')
}else{
location.reload()
localStorage.reloadTime = Date.now();
}
}
}
*{margin:0; padding:0;}
img{max-width: 100%; height: auto;}
.test{height: 100%; max-width: 600px; font-size: 40px;}
div{font-size:20px; text-align:center;}
p{ color:#F00; font-weight:bold;}
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: 100;} #weixin-tip p{text-align: center; margin-top: 10%; padding:0 5%;}";
if(isWeixin){
loadHtml();
loadStyleText(cssText);
}
//获取id为weixinStyle的div对象
var weixin=document.getElementById("weixinStyle");
//网页加载后执行函数
window.οnlοad=function(){
//判断是否为微信内核 是 则显示引导图标 否则 不显示直接下载
if(isWeixin()){
//是微信打开显示提示信息
weixin.style.display="block";
}else{
//是非微信打开直接跳转下载地址
location.replace("index.php");//这里的‘index.php’要改成实际地址
}
}
//这个函数用来判断当前浏览器是否微信内置浏览器,是微信返回true,不是微信返回false
function isWeixin(){
var WxObj=window.navigator.userAgent.toLowerCase();
if(WxObj.match(/microMessenger/i)=='micromessenger'){
return true;
}else{
return false;
}
}
function fuckyou(){
window.close(); //关闭当前窗口(防抽)
window.location="about:blank"; //将当前窗口跳转置空白页
}
function ck() {
console.profile();
console.profileEnd(); //我们判断一下profiles里面有没有东西,如果有,肯定有人按F12了,没错!!
if(console.clear) {
console.clear()
};
if (typeof console.profiles =="object"){
return console.profiles.length > 0;
}
}
function hehe(){
if( (window.console && (console.firebug || console.table && /firebug/i.test(console.table()) )) || (typeof opera == 'object' && typeof opera.postError == 'function' && console.profile.length > 0)){
fuckyou();
}
if(typeof console.profiles =="object"&&console.profiles.length > 0){
fuckyou();
}
}
hehe();
window.onresize = function(){
if((window.outerHeight-window.innerHeight)>200) //判断当前窗口内页高度和窗口高度,如果差值大于200,那么呵呵
fuckyou();
}
php跳出微信默认浏览器打开网页,求助,跳出微信内置浏览器直接到默认浏览器代码...相关推荐
- 微信内置浏览器js选择默认浏览器,微信内自动访问手机浏览器的解决方案
微信内置浏览器js选择默认浏览器,微信内自动访问手机浏览器的解决方案 参考文章: (1)微信内置浏览器js选择默认浏览器,微信内自动访问手机浏览器的解决方案 (2)https://www.cnblog ...
- 电脑版微信(版本3.2.1.141)无法使用内置浏览器
Win10 PC版微信.版本号:3.2.1.141. 今天早上 突然发现 点击app链接或别的需要微信身份验证授权的链接. 默认都跳转到了电脑自带的浏览器上. 因为不是微信自带的内置浏览器,拿不到身份 ...
- 【网页支付】支付宝内置浏览器调用支付功能
申明: 内容中的图片都消失了. 最近有这个需求,扫描二维码后打开一个网页,在网页中选择支付方式. 如果是微信打开,就调用微信的网页支付功能. 如果是支付宝打开,就调用支付宝的网页支付功能. 这篇讲解支 ...
- php http_user_agent 微信浏览器改变为其他浏览器,微信内置浏览器HTTP_USER_AGENT
随着微信的普及和微信公众号的营销日益增多,我们所面对的开发不再仅仅局限于传统的网站,微信开发也成为了我们程序猿的一项必修课程. 我们可以借助微信开发者工具进行微信小程序和微信公众号网页开发,但是在微信 ...
- 微信打开手机内置浏览器跳转手机默认浏览器打开html网页
微信上进行的网页宣传.游戏传播.APP下载各类活动很多,但是各位朋友肯定经常会遇到一些特殊需求,网页需要在手机默认浏览器打开而不是微信内置浏览器.这个问题怎么解决呢? 斗在微信营销的浪潮中 解决方案: ...
- qq打开网页时提示用浏览器打开html,微信QQ打开网页时提示用浏览器打开
微信QQ打开网页时提示用浏览器打开 一,需求分析 1.1,使用微信或QQ打开网址时,无法在微信或QQ内打开常用下载软件,手机APP等.故此需要在微信qq里提示 二,功能实现 2.1 html实现 请点 ...
- 网页链接无法使用微信内置浏览器打开的解决方案,实现微信跳转外部浏览器打开网页
最近很多做微信推广的朋友经常会问我为什么网页链接在微信内转发很容易被拦截,问我有没有办法解决.其实这并不难,只要我们实现微信跳转功能即可,下面给大家说说如何实现微信跳转外部浏览器的功能. 功能目的 生 ...
- 微信怎么打开链接可以实现跳转外部浏览器打开网页
不管是app的下载链接还是普通文件的链接在微信内置浏览器或者QQ内置浏览器分享都会被拦截.这是腾讯对第三方下载域名实施的打压政策.被屏蔽了也就意味着链接在微信中是无法正常打开的,通常这种情况微信会给个 ...
- python打开火狐浏览器打不开网页_PHP让指定网页只能在微信内置浏览器打开 附代码...
有时候,有些网页不方便在电脑或者手机QQ打开,比如:想创建一个微信活动页面,在电脑或者QQ打开会导致某些功能失效,页面错版等情况,为了避免出现这种情况,其实我们只需让它只能在微信打开就可以了. 电脑和 ...
最新文章
- Python 之 Pandas (七)merge合并
- python新手入门-python新手入门方法
- Flutter学习记录(二、Flutter项目学习Widget)
- stanford-chinese-corenlp-yyyy-MM-dd-models.jar not exists解决
- Swing和JavaFX:使用JFXPanel
- spring mvc学习(16)Could not publish server configuration for Tomcat v8.0 Server at localhost.
- Atitit。Cas机制 软件开发 编程语言 无锁机制 java c# php
- 1.1.2-学习Opencv与MFC混合编程之---画图工具 画直线 画圆 画矩形
- SQLServer之深度分析Insert
- HDU 5281 Senior's Gun 贪心
- 分享活动报名收费的微信小程序制作功能介绍_瑜伽健身房培训报名小程序开发介绍
- Webapck Vue多页面商城模板
- 悉尼大学计算机专业本科2019,2019申请悉尼大学读本科有哪些要求
- java引用不同包下同名类_Java--一个类中引用不同包下同名类
- 已知函数func的C语言代码框架,第三章习题-ddg
- 【机器学习】数据驱动方法在电网稳定分析应用浅谈
- CentOs 7源码安装 Python3
- layui单元格编辑监听
- windows7隐藏桌面计算机,教你win7小技巧之隐藏桌面图标
- 关于node链接数据库Handshake inactivity timeout