View Categories

Standard Integration

The on-page-script (“OPS”) is formatted for custom websites where there are no iframe restrictions (CORS errors). If you have your own app or custom website in React or Vue, this is the script that you want to use. A copy of this script can be found in your My Gates page.

<!-- ON-PAGE-SCRIPT -->  
  <div id="authbox">  
  <button id="ops_start" class="btn btn-outline-secondary btn-lg" style="display:none;">Start Auth</button>  
  <div id="statusconsole">NFT Gater</div><div id="p_inj"></div>  
  <script>  
     try{ 
 	import "https://ngtr.nyc3.digitaloceanspaces.com/3P.css";  
        import libz from "https://ngtr.nyc3.digitaloceanspaces.com/opsv2.js" 
        document.getElementById("ops_start").addEventListener("click", () => {  
             let callback = window.location  
             let reDir = "https://nftgater.vercel.app/OPS.html?callback="+callback 
             window.location = reDir 
         })  
         let auth = libz.g_A() 
         if(auth) {  
             document.getElementById("statusconsole").innerHTML = "&#9989; Loading gate payload..."  
             libz.g_E(auth);  
         } else {  
             libz.drawBtn();  
             document.getElementById("statusconsole").innerHTML = "&#9889; Authenticate wallet to begin."  
         }  
     }catch(err) { 
         console.log(err) 
         return; 
     } 
  </script>  
  </div>  
  <!-- END OF OPS SCRIPT -->  
 

If you are finding difficulties applying this script to your site, please see Alternate Script.