APP!手机模板 Im Dream(immwa)全功能版3.12,在使用手机打开页面的时候,会弹出如图的提示框:
而且要等半天才会消失,很影响用户体验,魔趣建站经过研究,发现这是一个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)
注释掉即可!然后更新缓存即可生效!
修改后效果如下图:
可以看到,已经不会显示那个烦人的提示框了!
1
历史资源提醒--必看
该页面资源/教程来自原魔趣吧历史资源转移,因发布历史久远,部分资源/教程可能已失效或无法在最新版程序中安装使用!DZ资源建议在Discuz3.4及以下版本使用,PHP版本建议5.6。资源仅提供做代码研究学习使用!
因改版,部分贴内链接将无法正常跳转,如链接失效或未正常跳转,请利用站内搜索功能搜索资源名称获取对应资源!