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

How to make a pop under open in a tab?

Discussion in 'BlackHat Lounge' started by Hawkster, Nov 28, 2015.

  1. Hawkster

    Hawkster Jr. VIP Jr. VIP

    Joined:
    Jun 22, 2013
    Messages:
    3,510
    Likes Received:
    3,728
    Gender:
    Male
    Occupation:
    Listen to everyone - Follow no-one
    Location:
    UK
    Home Page:
    I was just on pornhub. (downloading not watching :p )

    When you click a video it opens in a new tab and the existing page redirects to an ad, which is quite clever because it gets by adblocker.


    Anyone know how i can achieve this with lets say a popads.net popunder code?

    So that when a user clicks a link on my site (wordpress) it opens in new tab and redirects existing tab to an advert
     
    Last edited: Nov 28, 2015
  2. Asif WILSON Khan

    Asif WILSON Khan Executive VIP Jr. VIP

    Joined:
    Nov 10, 2012
    Messages:
    12,591
    Likes Received:
    34,717
    Gender:
    Male
    Occupation:
    Fun Lovin' Criminal
    Location:
    London
    Home Page:
    I don't have time to look at it at the moment but it is probably an "onclick" event or jQuery.click

    EDIT: Tried to take a look but pornhub won't even load for me.

    [​IMG]

    Was getting in the mood and persuading my self it was work, now sitting here with an erection twiddling me thumbs.
     
    • Thanks Thanks x 2
  3. Hawkster

    Hawkster Jr. VIP Jr. VIP

    Joined:
    Jun 22, 2013
    Messages:
    3,510
    Likes Received:
    3,728
    Gender:
    Male
    Occupation:
    Listen to everyone - Follow no-one
    Location:
    UK
    Home Page:

    LMAO.


    Weird that the site wont open for you, seems to work fine here.


    "onclick" event or jQuery.click will help me with my search so thanks for that mate.
     
    • Thanks Thanks x 1
  4. Fuggz

    Fuggz Power Member

    Joined:
    Mar 25, 2010
    Messages:
    582
    Likes Received:
    603
    don't worry guys I will monitor the site 5x/day and report any downtime for the next week ;)

    Something like: <body onclick="myfunction()">

    Replace your function with probably (window.location.hfref="http://www.redirectedURL.com")

    However this would obviously be triggered by a click anywhere on the page, if you wan't it just when the user navigates to another page then I would use:

    <body onunload="myfunction()">

    <body onbeforeunload="myfunction()">

    or a customized variation depending on your needs.

    Oh and of course don't forget the regular new page in a new tab with basic HTML.
     
    • Thanks Thanks x 1
  5. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,232
    Occupation:
    Retired
    Location:
    Old Peoples Home
    Probably a bit old school but how about a normal href link with a target of _blank? That should open in a new tab
     
    • Thanks Thanks x 1
  6. Hawkster

    Hawkster Jr. VIP Jr. VIP

    Joined:
    Jun 22, 2013
    Messages:
    3,510
    Likes Received:
    3,728
    Gender:
    Male
    Occupation:
    Listen to everyone - Follow no-one
    Location:
    UK
    Home Page:
    Even with the help above i cant work it out - im not great with this kinda thing.