Prevent redirect website

Everything about using Adblock Plus on Google Chrome
Post Reply
usasent
Posts: 1
Joined: Sun Oct 25, 2020 3:35 pm

Prevent redirect website

Post by usasent »

How to Block redirect script tags

Code: Select all

 </script>
           <script>
         function getModelFromHash() {
            var m = /\#\/s\/(\w+)\//.exec(window.location.hash);
            if(m && m.length && m[1]) {
               return m[1];
            } else {
               return "";
            }
         }

         if(document.referrer.indexOf('website.com') === -1) {
           var url = "https://website.com/?beta_redirect=1&pid=g248871.sub&s=e";
           var model = getModelFromHash();
           if(model && url) {
             url = url.replace('?', (model + '?'));
           }
           window.location.href = url;
         }
       </script>
Post Reply