Chaturbate popunder

WebPirate

Registered Member
Joined
Jan 11, 2018
Messages
61
Reaction score
15
Hi,

Does anyone know a free method to make a popunder, i want to put a chaturbate link it. Chaturbate only has their pop-up promo tool.. no popunders.
 
Not my forte, but since no one replied yet...

Chaturbate's popup script is already programmed for popunders. The problem is that most modern web browsers no longer allow such code to execute. There's workarounds for it, but I'm not aware of any fully-satisfying solutions (unless you or anyone else reading this knows of some example sites, in which case I'll be interested to see).

With that said, you can mimic the spirit of the popunder by:

1. Opening your webpage URL using a new tab:
Code:
 window.open("","_blank");
2. Redirecting to the affiliate link using the current tab:
Code:
window.location.href="";

I'll present two methods for Chrome specifically.

Warning: No idea if the below is against Chaturbate's TOS, so beware.

*** Replace all "%" with "<" in the code snippets (won't let me post it otherwise), and scan the snippets for URLs to replace as well.

Method 1: Use a modified version of their popup script popchaturbate.js.
  • Download their script file from https://chaturbate.com/affiliates/promotools/popup/*****/popchaturbate.js.
  • Replace these 5 lines inside of it:
Code:
var windowprops = "width=1024,height=768,location=yes,toolbar=yes,menubar=yes,status=yes,scrollbars=yes,resizable=yes,top=1,left=1";

var url = "https://EXAMPLE_URL.com/in/?tour=&amp;campaign=&amp;track=popup";

var myWin = window.open(url, "", windowprops);

myWin.blur();

window.focus();

With these three lines:​
Code:
var url = "https://EXAMPLE_URL.com/in/?tour=&amp;campaign=&amp;track=popup";

window.open(window.location.href, "_blank");

window.location.href = url;
  • Upload this modified file to your website server
  • Insert this tag into your website page:
Code:
%script src="path-to-your-modified-popchaturbate.js" type='text/javascript'></script>

Method 2: Use JavaScript to change the popchaturbate.js file.

The below code is by no means the ideal way to approach it, but for example it'll do. It works on Chrome on PC, but don't count on it working for other browsers -- test it yourself.

Code:
<!doctype html>
<html>
  <head>
    <title>
    </title>
  </head>
  <body>
    <button>Click me for interaction</button>
    %script>
      function freeze(b){
        if (window.check===undefined) window.check={};
        if (b) Object.defineProperty(check, '', {value:false,writable:false,enumerable:true,configurable: true});
        else Object.defineProperty(check, '', {value:false,writable:true,enumerable:true, configurable:true});
        check =()=>{if (window.jQuery && jQuery.fn) {var a=jQuery.fn.jquery.split('.');
        if (a.length>=2){if(a[0]>1||(a[0]==1&&a[1]>=3)){return true;}}}return false;};
      }
      function popunder() {
          let chaturbateFunc = window.doMyStuff.toString();
          let affiliateLink = chaturbateFunc.match(new RegExp("url.=.\"(.*)\";"))[1];
          chaturbateFunc = chaturbateFunc
          .replace(new RegExp("url.=..*;"),"url='"+window.location.href+"';")
          .replace(new RegExp("myWin.=..*;"),"myWin=window.open(url,'_blank');")
          .replace("myWin.blur();","window.location.href='"+affiliateLink+"';")
          .replace("function doMyStuff($) {","");
          if (navigator.userAgent.indexOf("Chrome") !== -1){
          }
          chaturbateFunc=chaturbateFunc.substring(0, chaturbateFunc.length - 1);
          window.doMyStuff=function($) {
            let func=new Function(`$`,chaturbateFunc)($);
          };
      }
      freeze(true);
    </script>
    %script src='https://EXAMPLE.com/affiliates/promotools/popup/****/popchaturbate.js' type='text/javascript'></script>
    %script>
        if (navigator.userAgent.indexOf("Chrome") !== -1) {
          popunder();
        }
        freeze(false);
    </script>
  </body>
</html>
 
thank you, helpful

Not my forte, but since no one replied yet...

Chaturbate's popup script is already programmed for popunders. The problem is that most modern web browsers no longer allow such code to execute. There's workarounds for it, but I'm not aware of any fully-satisfying solutions (unless you or anyone else reading this knows of some example sites, in which case I'll be interested to see).

With that said, you can mimic the spirit of the popunder by:

1. Opening your webpage URL using a new tab:
Code:
 window.open("","_blank");
2. Redirecting to the affiliate link using the current tab:
Code:
window.location.href="";

I'll present two methods for Chrome specifically.

Warning: No idea if the below is against Chaturbate's TOS, so beware.

*** Replace all "%" with "<" in the code snippets (won't let me post it otherwise), and scan the snippets for URLs to replace as well.

Method 1: Use a modified version of their popup script popchaturbate.js.
  • Download their script file from https://chaturbate.com/affiliates/promotools/popup/*****/popchaturbate.js.
  • Replace these 5 lines inside of it:
Code:
var windowprops = "width=1024,height=768,location=yes,toolbar=yes,menubar=yes,status=yes,scrollbars=yes,resizable=yes,top=1,left=1";

var url = "https://EXAMPLE_URL.com/in/?tour=&amp;campaign=&amp;track=popup";

var myWin = window.open(url, "", windowprops);

myWin.blur();

window.focus();

With these three lines:​
Code:
var url = "https://EXAMPLE_URL.com/in/?tour=&amp;campaign=&amp;track=popup";

window.open(window.location.href, "_blank");

window.location.href = url;
  • Upload this modified file to your website server
  • Insert this tag into your website page:
Code:
%script src="path-to-your-modified-popchaturbate.js" type='text/javascript'></script>

Method 2: Use JavaScript to change the popchaturbate.js file.

The below code is by no means the ideal way to approach it, but for example it'll do. It works on Chrome on PC, but don't count on it working for other browsers -- test it yourself.

Code:
<!doctype html>
<html>
  <head>
    <title>
    </title>
  </head>
  <body>
    <button>Click me for interaction</button>
    %script>
      function freeze(b){
        if (window.check===undefined) window.check={};
        if (b) Object.defineProperty(check, '', {value:false,writable:false,enumerable:true,configurable: true});
        else Object.defineProperty(check, '', {value:false,writable:true,enumerable:true, configurable:true});
        check =()=>{if (window.jQuery && jQuery.fn) {var a=jQuery.fn.jquery.split('.');
        if (a.length>=2){if(a[0]>1||(a[0]==1&&a[1]>=3)){return true;}}}return false;};
      }
      function popunder() {
          let chaturbateFunc = window.doMyStuff.toString();
          let affiliateLink = chaturbateFunc.match(new RegExp("url.=.\"(.*)\";"))[1];
          chaturbateFunc = chaturbateFunc
          .replace(new RegExp("url.=..*;"),"url='"+window.location.href+"';")
          .replace(new RegExp("myWin.=..*;"),"myWin=window.open(url,'_blank');")
          .replace("myWin.blur();","window.location.href='"+affiliateLink+"';")
          .replace("function doMyStuff($) {","");
          if (navigator.userAgent.indexOf("Chrome") !== -1){
          }
          chaturbateFunc=chaturbateFunc.substring(0, chaturbateFunc.length - 1);
          window.doMyStuff=function($) {
            let func=new Function(`$`,chaturbateFunc)($);
          };
      }
      freeze(true);
    </script>
    %script src='https://EXAMPLE.com/affiliates/promotools/popup/****/popchaturbate.js' type='text/javascript'></script>
    %script>
        if (navigator.userAgent.indexOf("Chrome") !== -1) {
          popunder();
        }
        freeze(false);
    </script>
  </body>
</html>
 
Back
Top