0xploit.com

Approved [MyBB] Auto Redirect Url Script

CyberGod

Administrator
Staff member
Admin
Moderator
Joined
Dec 23, 2021
Messages
784
Hellcoins
♆25,989
Profile Music
Telegram
Add this code to the footer template
Code:
<script type="text/javascript" >
$$('div.post_body a').each(function(s){
link=s+'';
if(!link.include('yoursite.com') && !link.include('javascript') && !link.include('mybb.com') && !link.include('site1.com') && !link.include('site2.com')){
s.href="redirect.html?link="+encodeURIComponent(link);
s.target="_blank";
}
});
</script>

Created a "redirect.html" file and upload it to your root directory
Code:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
#panel{
width: 500px;
border: 1px solid;
border-color:#999999;
margin:50px auto;
padding: 8px;
font: 12px tahoma;
text-align:center;
background-color:#fcfbf7;
}
</style>
</head>
<body>
<script type="text/javascript">
var link=decodeURIComponent(location.search.substr(6));
second = 10; //Wait time in seconds
function AutoRedirect(){
document.getElementById('time').innerHTML=second;
if(second==0){
location.href=link;
}
second--;
}
</script>
<div id="panel">
<p>You clicked on a link that not belong to our site.
</p>
<script type="text/javascript">
document.write("<a href='"+link+"'>"+link+"</a>")
</script>
<p>Auto redirect in<span id="time"></span> second(s).</p>
</div>
<script type="text/javascript">
AutoRedirect(second);
setInterval("AutoRedirect(second)",1000);
</script>
</body>
</html>
And you're done. :)
 
Top