GithubHelp home page GithubHelp logo

awesome-weixin's People

Contributors

krave1986 avatar

Watchers

 avatar  avatar

awesome-weixin's Issues

如何确定安卓手机上的微信浏览器版本

安卓手机上,微信所使用的浏览器内核是 x5 内核。
x5的官网上,提供了“无法加载x5内核的解决方案”。
文档名字叫:HowToLoadX5Core.doc

其中提到了,访问这个网页
http://soft.imtt.qq.com/browser/tes/feedback.html
显示000000的话,表示手机加载的是系统内核,如果是大于0的数字,表示加载了 x5 内核。

检查了一下这个网页,其内容非常简单,无非就是检查 navigator 字符串中,是否包含 TBS/ ;以及TBS/ 后面跟的数字。

源代码如下

function Init() {
	var ua = navigator.userAgent;
	var version = "000000";
	var key = "TBS/";
	var start = ua.indexOf(key);
	if (start !== -1) {
		start = start + key.length;
		version = ua.substr(start, ua.indexOf(" ", start) - start);
	}
	var ele = document.getElementById("version");
	var p = document.createElement("p");
	p.innerHTML = "<b>" + version + "</b>";
	ele.appendChild(p);
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.