禁用微信公众号复制链接
作者:互联网
禁用微信分享
记录一个奇怪的需求需要禁用微信公众号复制链接 但是跳转a 链接后会失效 但是可以解决
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
}
} else {
onBridgeReady();
}
function onBridgeReady() {
WeixinJSBridge.call('hideOptionMenu');
}
标签:微信,attachEvent,onBridgeReady,禁用,document,链接 来源: https://blog.csdn.net/weixin_43939924/article/details/113048850