Home | History | Annotate | Download | only in isAllowedAccess
      1 <!DOCTYPE html>
      2 <!--
      3  * Copyright (c) 2010 The Chromium Authors. All rights reserved.  Use of this
      4  * source code is governed by a BSD-style license that can be found in the
      5  * LICENSE file.
      6 -->
      7 <html>
      8   <head>
      9     <title>extension.isAllowedAccess Sample</title>
     10     <link rel="stylesheet" href="./sample.css">
     11   </head>
     12   <body>
     13     <h1>extension.isAllowedAccess Sample</h1>
     14     <section>
     15       <ol>
     16         <li><p>
     17           <span>1</span> chrome.extension.isAllowedFileSchemeAccess:
     18           <code id="file">unknown</code> (unpacked extensions always have
     19           file scheme access, you'll need to install this as a packed
     20           extension to toggle it properly)
     21         </p></li>
     22         <li><p>
     23           <span>2</span> chrome.extension.isAllowedIncognitoAccess:
     24           <code id="incognito">unknown</code>
     25         </p></li>
     26       </ol>
     27     </section>
     28     <script>
     29       chrome.extension.isAllowedFileSchemeAccess(function(state) {
     30         var el = document.getElementById('file');
     31         el.textContent = el.className = state ? 'true': 'false';
     32       });
     33       chrome.extension.isAllowedIncognitoAccess(function(state) {
     34         var el = document.getElementById('incognito');
     35         el.textContent = el.className = state ? 'true': 'false';
     36       });
     37     </script>
     38   </body>
     39 </html>
     40