Skip to content

Instantly share code, notes, and snippets.

@xuanfeng
Created May 26, 2015 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuanfeng/fe0c512830ef3d633dac to your computer and use it in GitHub Desktop.
Save xuanfeng/fe0c512830ef3d633dac to your computer and use it in GitHub Desktop.
隐藏微信右上角按钮
//隐藏微信菜单
function initWeixinBridge(){
WeixinJSBridge.call('hideOptionMenu');
}
if (typeof WeixinJSBridge == "object" &&
typeof WeixinJSBridge.invoke == "function") {
initWeixinBridge();
} else {
if (document.addEventListener) {
document.addEventListener("WeixinJSBridgeReady", initWeixinBridge, false);
} else if (document.attachEvent) {
document.attachEvent("WeixinJSBridgeReady", initWeixinBridge);
document.attachEvent("onWeixinJSBridgeReady", initWeixinBridge);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment