APP!手机模板 Im Dream全功能版3.21及3.12关闭弹出苹果提示按钮的方法 [复制链接]

moqu8 2018-1-8

2886 0
APP!手机模板 Im Dream(immwa)全功能版3.12,在使用手机打开页面的时候,会弹出如图的提示框:


404105a530df72f8d1.png

而且要等半天才会消失,很影响用户体验,魔趣建站经过研究,发现这是一个JS的作用,只需要修改这个JS即可关闭!JS位置及修改方法:


位置:source/plugin/cis_weixin/core/js/addtohomescreen.js

搜索代码:
var message = '';
注释掉如下代码段:
/* if ( typeof this.options.message == 'object' && ath.language in this.options.message ) {		// use custom language message
message = this.options.message[ath.language][ath.OS];
} else if ( typeof this.options.message == 'object' && ath.OS in this.options.message ) { // use custom os message
message = this.options.message[ath.OS];
} else if ( this.options.message in ath.intl ) { // you can force the locale
message = ath.intl[this.options.message][ath.OS];
} else if ( this.options.message !== '' ) { // use a custom message
message = this.options.message;
} else if ( ath.OS in ath.intl[ath.language] ) { // otherwise we use our message
message = ath.intl[ath.language][ath.OS];
}

// add the action icon
message = '<p>' + message.replace(/%icon(?:\[([^\]]+)\])?/gi, function(matches, group1) {
return '<span class="ath-action-icon">' + (!!group1 ? group1 : 'icon') + '</span>';
}); + '</p>';

// create the message container
var homescreen = document.getElementById("homescreen");
this.viewport = document.createElement('div');
this.viewport.className = 'ath-viewport';
if ( this.options.modal ) {
this.viewport.className += ' ath-modal';
}
if ( this.options.mandatory ) {
this.viewport.className += ' ath-mandatory';
}
//this.viewport.style.position = 'absolute';

// create the actual message element

this.element = document.createElement('div');
this.element.className = 'ath-container ath-' + ath.OS + ' ath-' + ath.OS + (ath.OSVersion + '').substr(0,1) + ' ath-' + (ath.isTablet ? 'tablet' : 'phone'); */

或者直接用这个文件替换:


点击下载 addtohomescreen.rar(大小:6.14K)


注释掉即可!然后更新缓存即可生效!


修改后效果如下图:


972595a530ed7c6c10.png

可以看到,已经不会显示那个烦人的提示框了!





1






最新回复 (0)
返回
支持中心
邮箱:winkill2012@qqcom
新站优化中!部分功能尚未完善,敬请谅解!
支持中心