スタックオーバーフローで多くの問題を検索しましたが、ここ で重複している可能性がありますポップアップの検出
しかし、 Chromenot helped for me
でのテスト中(v26.0.1410.64でテスト済み)
次のアプローチですが、Worked in IE and Firefox
not in Chrome
var popup = window.open(winPath,winName,winFeature,true);
if (!popup || popup.closed || typeof popup.closed=='undefined'){
//Worked For IE and Firefox
alert("Popup Blocker is enabled! Please add this site to your exception list.");
window.location.href = 'warning.html';
} else {
//Popup Allowed
window.open('','_self');
window.close();
}
Chromeでも機能するより良いソリューションはありますか?