Home | History | Annotate | Download | only in policy_PopupsAllowedForUrls
      1 <!doctype html>
      2 <html lang="en">
      3 <head>
      4 <meta charset="utf-8">
      5 <title>Popup Status</title>
      6 <id>
      7 <script type="text/javascript">
      8 var pageReady = false;
      9 
     10 function onLoad() {
     11   pageReady = true;
     12   isPopupBlocked();
     13 }
     14 
     15 function isPopupBlocked() {
     16   var popup_window = window.open(null, "", "width=100,height=100");
     17   try {
     18     popup_window.close();
     19     document.getElementById('status').innerHTML += 'Allowed.';
     20     return false;
     21   }
     22   catch (e) {
     23     document.getElementById('status').innerHTML += 'Blocked.';
     24     return true;
     25   }
     26 }
     27 </script>
     28 </head>
     29 <body onload="onLoad()">
     30 <div id=status>Pop-ups Status: </div>
     31 </body>
     32 </html>
     33