Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/362.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript “如何抑制警报”;没有打开URL*自定义_协议*:/…”的应用程序集;关于Safari 7.0_Javascript_Macos_Safari - Fatal编程技术网

Javascript “如何抑制警报”;没有打开URL*自定义_协议*:/…”的应用程序集;关于Safari 7.0

Javascript “如何抑制警报”;没有打开URL*自定义_协议*:/…”的应用程序集;关于Safari 7.0,javascript,macos,safari,Javascript,Macos,Safari,Safari 6.1、Firefox和Chrome没有任何问题。 为了消除警报(应用程序尚未安装),我使用了类似的方法 window.alert = function(title, message) { //disable all alerts! } 还有这个 var prepareLauncherBase = function (){ var browserName = getBrowserTypeObj()[0].toUpperCase(); log(browser

Safari 6.1、Firefox和Chrome没有任何问题。 为了消除警报(应用程序尚未安装),我使用了类似的方法

window.alert = function(title, message) {
  //disable all alerts!
}
还有这个

  var prepareLauncherBase = function (){
    var browserName = getBrowserTypeObj()[0].toUpperCase();
    log(browserName);
    // alert(browserName); 
    var aLauncher = document.getElementById('recorder_launcher');
    var iiFrame = document.getElementById('protocol_frame');
    if ( aLauncher == null || aLauncher == 'undefined'){ 
      aLauncher = document.createElement('a');
      aLauncher.setAttribute("id", 'recorder_launcher');
      document.body.appendChild(aLauncher);
     }
    if (browserName == 'MSIE' || browserName == 'FIREFOX' || browserName == 'SAFARI'){ 
      if (iiFrame == null || iiFrame == 'undefined' ) { 
        //alert('creating iframe');
        $('<iframe name="protocol_frame">').appendTo('body'); 
        //iiFrame = document.getElementById('protocol_frame');    
        aLauncher.setAttribute('target', 'protocol_frame');               
    }
    } else {
      aLauncher.setAttribute('target', '_top');
    }
  };  
var prepareLauncherBase=函数(){
var browserName=getBrowserTypeObj()[0].toUpperCase();
日志(浏览器名称);
//警报(浏览器名称);
var aLauncher=document.getElementById('recorder_launcher');
var iiFrame=document.getElementById('protocol_frame');
如果(aLauncher==null | | aLauncher==undefined'){
aLauncher=document.createElement('a');
setAttribute(“id”,“recorder_launcher”);
document.body.appendChild(aLauncher);
}
如果(browserName=='MSIE'| | browserName=='FIREFOX'| | browserName=='SAFARI'){
如果(iiFrame==null | | iiFrame==undefined'){
//警报(“创建iframe”);
$('')。附于('正文');
//iiFrame=document.getElementById('protocol_frame');
setAttribute('target','protocol_frame');
}
}否则{
setAttribute('target','u top');
}
};  
有什么想法吗