1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Exit popup for wordpress

Discussion in 'Black Hat SEO' started by NoHoneyWithoutMoney, Dec 7, 2011.

  1. NoHoneyWithoutMoney

    NoHoneyWithoutMoney Regular Member

    Joined:
    Dec 5, 2011
    Messages:
    365
    Likes Received:
    81
    Occupation:
    Killer
    Location:
    * Locating ... Server Down 404 *******************
    Guy do you know any EXIT POPUP FOR WORDPRESS plugin ....please help thanks
     
  2. gimme4free

    gimme4free Executive VIP Jr. VIP Premium Member

    Joined:
    Oct 22, 2008
    Messages:
    1,881
    Likes Received:
    1,932
    This isn't specifically a WP plugin but if you add a relation to it it will work just fine:

    Add to page head / body:
    Code:
    <script language="javascript" src="http://www.yoursite.com/js/popup.js"></script>
    
    Script (popup.js):
    Code:
    var exitsplashmessage = ">>>>>>>>>>>>>> WAIT WAIT WAIT <<<<<<<<<<<<<<<\n\nClick The Cancel Button NOW To Get An Exclusive Discount!\n\n>>>>>>>>>>>>>>>> Click Cancel <<<<<<<<<<<<<<<<<";
    var PreventExitSplash = false;
    function addLoadEvent(func) {
    	var oldonload = window.onload;
    	if (typeof window.onload != 'function') {
    		window.onload = func;
    	}else{
    		window.onload = function() {
    			if (oldonload) {
    				oldonload();
    				}
    			func();
    			}
    		}
    	}
    function addClickEvent(a,i,func){
    	if (typeof a[i].onclick != 'function'){
    		a[i].onclick = func;
    		}
    	}
    function DisplayExitSplash(){
    	if(PreventExitSplash == false){
    		PreventExitSplash=true;
    		top.window.location='http://www.blackhattoolz.com/special.php';
    		return exitsplashmessage;
    		}
    	}
    var a = document.getElementsByTagName('A');
    for (var i = 0; i < a.length; i++) {
    	if(a[i].target !== '_blank') {
    		addClickEvent(a,i, function(){
    			PreventExitSplash=true;
    			});
    	}else{
    		addClickEvent(a,i, function(){
    			PreventExitSplash=false;
    			});
    		}
    	}
    disablelinksfunc = function(){
    	var a = document.getElementsByTagName('A');
    	for (var i = 0; i < a.length; i++) {
    		if(a[i].target !== '_blank') {
    			addClickEvent(a,i, function(){
    				PreventExitSplash=true;
    				});
    		}else{
    			addClickEvent(a,i, function(){
    				PreventExitSplash=false;
    				});
    			}
    		}
    	}
    addLoadEvent(disablelinksfunc);
    disableformsfunc = function(){
    	var f = document.getElementsByTagName('FORM');
    	for (var i=0;i<f.length;i++){
    		if (!f[i].onclick){
    			f[i].onclick=function(){
    				PreventExitSplash=true;
    				}
    		}else if (!f[i].onsubmit){
    			f[i].onsubmit=function(){
    				PreventExitSplash=true;
    				}
    			}
    		}
    	}
    addLoadEvent(disableformsfunc);
    window.onbeforeunload = DisplayExitSplash;
    
     
    • Thanks Thanks x 2
  3. eterxx

    eterxx Junior Member

    Joined:
    Mar 25, 2011
    Messages:
    119
    Likes Received:
    45
    Occupation:
    a little bit of this, a little bit of that
    You can try Exit Viral, it works fine
     
    • Thanks Thanks x 1
  4. hunar

    hunar Regular Member

    Joined:
    Jan 1, 2009
    Messages:
    479
    Likes Received:
    178
    Location:
    Minnesota
  5. NoHoneyWithoutMoney

    NoHoneyWithoutMoney Regular Member

    Joined:
    Dec 5, 2011
    Messages:
    365
    Likes Received:
    81
    Occupation:
    Killer
    Location:
    * Locating ... Server Down 404 *******************
    Thanks Mate the link has gone any chance you can share it as you have it . Thanks


     
  6. appliedscience

    appliedscience Regular Member

    Joined:
    Jan 28, 2011
    Messages:
    202
    Likes Received:
    5

    This is working but the script doesn't take me to the new page after selecting 'stay on page'. I updated this to my own page but didn't work with the domain listed in the script either. Is there something else I need to do to make it work?
     
  7. seoguy81

    seoguy81 Power Member

    Joined:
    May 18, 2011
    Messages:
    779
    Likes Received:
    163
    Occupation:
    Full time IM
    Location:
    My Desk
    Search for EzAffiliateCash. Besides exit pop ups it also has other features like interstitial and text links as well.
     
  8. gimme4free

    gimme4free Executive VIP Jr. VIP Premium Member

    Joined:
    Oct 22, 2008
    Messages:
    1,881
    Likes Received:
    1,932
    Which browser are you using? This works fine for me, you must click "Cancel" when the popup appears. OK will close the page. PM me for a live demo link & see if that works in your browser as the script was directly copied / pasted from my site that I am using it on.
     
  9. appliedscience

    appliedscience Regular Member

    Joined:
    Jan 28, 2011
    Messages:
    202
    Likes Received:
    5
    I've tried both on Safari and FF. These exit pop ups appear when they are on websites I come across so don't see why the browser would block the script. I think I might just be missing something, is there a calling for JS I need in the head tags or something along those lines? The pop-up appears, just doesn't direct to the URL when selecting to stay.
     
  10. gimme4free

    gimme4free Executive VIP Jr. VIP Premium Member

    Joined:
    Oct 22, 2008
    Messages:
    1,881
    Likes Received:
    1,932
    Nothing else is required as the top.window.location process will set the page's URL before the user chooses Yes/No on the popup.
     
  11. appliedscience

    appliedscience Regular Member

    Joined:
    Jan 28, 2011
    Messages:
    202
    Likes Received:
    5

    Would you mind having a quick look to see if something is missing? I copied what you pasted but I still am unable to get this to direct to my exit page when selecting to stay on the page :(

    popup.js
    HTML:
    var exitsplashmessage = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TEST POPUP";
    var PreventExitSplash = false;
    function addLoadEvent(func) {
    	var oldonload = window.onload;
    	if (typeof window.onload != 'function') {
    		window.onload = func;
    	}else{
    		window.onload = function() {
    			if (oldonload) {
    				oldonload();
    				}
    			func();
    			}
    		}
    	}
    function addClickEvent(a,i,func){
    	if (typeof a[i].onclick != 'function'){
    		a[i].onclick = func;
    		}
    	}
    function DisplayExitSplash(){
    	if(PreventExitSplash == false){
    		PreventExitSplash=true;
    		top.window.location='http://www.mywebsite.com/exitpage.php';
    		return exitsplashmessage;
    		}
    	}
    var a = document.getElementsByTagName('A');
    for (var i = 0; i < a.length; i++) {
    	if(a[i].target !== '_blank') {
    		addClickEvent(a,i, function(){
    			PreventExitSplash=true;
    			});
    	}else{
    		addClickEvent(a,i, function(){
    			PreventExitSplash=false;
    			});
    		}
    	}
    disablelinksfunc = function(){
    	var a = document.getElementsByTagName('A');
    	for (var i = 0; i < a.length; i++) {
    		if(a[i].target !== '_blank') {
    			addClickEvent(a,i, function(){
    				PreventExitSplash=true;
    				});
    		}else{
    			addClickEvent(a,i, function(){
    				PreventExitSplash=false;
    				});
    			}
    		}
    	}
    addLoadEvent(disablelinksfunc);
    disableformsfunc = function(){
    	var f = document.getElementsByTagName('FORM');
    	for (var i=0;i<f.length;i++){
    		if (!f[i].onclick){
    			f[i].onclick=function(){
    				PreventExitSplash=true;
    				}
    		}else if (!f[i].onsubmit){
    			f[i].onsubmit=function(){
    				PreventExitSplash=true;
    				}
    			}
    		}
    	}
    addLoadEvent(disableformsfunc);
    window.onbeforeunload = DisplayExitSplash;
    

    test.html

    HTML:
     
    <html>
    <head>
    <script language="javascript" src="popup.js"></script>
    </head>
    <body>
       text...
    </body>
    </html>
    
     
    • Thanks Thanks x 1
  12. gimme4free

    gimme4free Executive VIP Jr. VIP Premium Member

    Joined:
    Oct 22, 2008
    Messages:
    1,881
    Likes Received:
    1,932
    Just tested that code and it is working perfectly for me, do you have any addons enabled that could be preventing the JS from working?
     
  13. appliedscience

    appliedscience Regular Member

    Joined:
    Jan 28, 2011
    Messages:
    202
    Likes Received:
    5
    I don't know of anything that could be preventing it from working. Exit pop-ups appear on other people's sites when I visit them and JS is enabled on both browsers I have tested on. I might have to try and find another code, even if it is to see if it's a browser issue.. any suggestions? I've Google'd but couldn't find anything.
     
  14. manolo12399

    manolo12399 Senior Member

    Joined:
    Jan 3, 2009
    Messages:
    819
    Likes Received:
    161
    Hi do you know how to stop the script to fire the pop up, when somebody click on a link?

    I have a link like this:<button onclick="location.href='https://www.paypal.com/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';">YES! Sign Me!</button>

    do you know how to let the button work, without fire the exit pop up?

    Thanks