Javascript 如何设置浏览器更新脚本标记以显示它正在使用的浏览器的名称?
我正在使用来自的浏览器更新。我正在尝试自定义用户看到的文本。“您正在使用旧版本的Internet Explorer…”。我似乎无法将浏览器名称显示在定制的桌面上 我使用的javascript代码是:Javascript 如何设置浏览器更新脚本标记以显示它正在使用的浏览器的名称?,javascript,Javascript,我正在使用来自的浏览器更新。我正在尝试自定义用户看到的文本。“您正在使用旧版本的Internet Explorer…”。我似乎无法将浏览器名称显示在定制的桌面上 我使用的javascript代码是: var $buoop = { vs: {i:8,f:35,o:25.63,s:7,c:10}, // browser versions to notify reminder: 0, // atfer how many hours should the messa
var $buoop = {
vs: {i:8,f:35,o:25.63,s:7,c:10}, // browser versions to notify
reminder: 0, // atfer how many hours should the message reappear
// 0 = show all the time
reminderClosed: 0, // if the user closes message it reappears after x hours
onshow: function(infos){}, // callback function after the bar has appeared
onclick: function(infos){}, // callback function if bar was clicked
onclose: function(infos){}, //
l: false, // set a language for the message, e.g. "en"
// overrides the default detection
test: false, // true = always show the bar (for testing)
text: "You're using an old version of vs We recommend you <a href='http://browsehappy.com/' target='_new'>upgrade your browser</a> for a better experience using this and other websites. ", // custom notification html text
newwindow: true // open link in new window/tab
};
function $buo_f(){
var e = document.createElement("script");
e.src = "//browser-update.org/update.min.js";
document.body.appendChild(e);
};
try {document.addEventListener("DOMContentLoaded", $buo_f,false)}
catch(e){window.attachEvent("onload", $buo_f)}
var$buoop={
vs:{i:8,f:35,o:25.63,s:7,c:10},//要通知的浏览器版本
提醒:0,//a邮件应重新出现多少小时
//0=始终显示
提醒关闭:0,//如果用户关闭消息,它将在x小时后重新出现
onshow:function(infos){},//出现条后的回调函数
onclick:function(infos){},//单击条时回调函数
onclose:function(infos){}//
l:false,//设置消息的语言,例如“en”
//覆盖默认检测
test:false,//true=始终显示条(用于测试)
text:“您使用的是旧版本的vs,我们建议您使用此网站和其他网站以获得更好的体验。”,//自定义通知html文本
newwindow:true//在新窗口/选项卡中打开链接
};
函数$buo_f(){
var e=document.createElement(“脚本”);
e、 src=“//browser update.org/update.min.js”;
文件.正文.附件(e);
};
请尝试{document.addEventListener(“DOMContentLoaded”,$buo_f,false)}
catch(e){window.attachEvent(“onload”,$buo_f)}
我解决了它。您将需要使用%s。显然,它不在开发人员手册上,我猜只是尝试和错误。因此,代码如下所示
text: "You're using an old version of %s We recommend you <a href='http://browsehappy.com/' target='_new'>upgrade your browser</a> for a better experience using this and other websites. ",
text:“您使用的是旧版本的%s,我们建议您使用此网站和其他网站以获得更好的体验。”,
为什么访问者会注意到随机站点对其浏览器的评论?这是网络,处理它。我想在信息消息上显示浏览器名称。可能吗?