Creating a redirect page for external links to Blogger Demo In the name of God, the Most Gracious, the Most Merciful. Peace be upon you, fol...
Creating a redirect page for external links to Blogger
In the name of God, the Most Gracious, the Most Merciful. Peace be upon you, followers of the Meadows Blog for Informatics and Technology for everyone who owns a blog on the blogging platform. In this explanation, God willing, we will learn how to create a redirect page on the blogger platform with a countdown timer that you can control and also explain to you how to customize the page To exclude some links that you do not want to be transferred, such as links to topics and also links to your website pages on social networking sites and ofcourse a guidance page is useful for increasing your profits on Adsense or any advertising company that deals with it where all the profits will be yours. Instead of using profit sites by shortening links, which usually share the profits with you
How to create an external links redirect page in Blogger
You will go to Blogger, then to Pages, and then you will create a new page in Blogger. This page we will create in order to redirect all external links. After creating the new page, you now need to set a link to the page that is appropriate for redirecting, as you know that the links in the pages belonging to Blogger are done automatically and they do not support Arabic so you will therefore create the page and write the word redirect in the title of the page and in the content and publish the page you will notice the link As follows when the page is opened.
Then you head back to the pages again and modify the same page that we created and delete the word that we wrote in the title and in the page and then go to HTML on the same page.
<div dir="rtl" style="text-align: right;" trbidi="on">
<div dir="ltr" style="text-align: center;" trbidi="on">
<style type="text/css">
a#reload {display: none;}
#arabes1 {background: #a4f9ed;padding: 14px;font-size: 35px; font-family: cursive;}
</style>
<!-- Adsense ads above -->
Here is the Adsense ad code
<!-- Adsense ads above -->
<!-- The first text -->
Here is the text that appears on the page
<!-- The first text -->
<br />
<!-- Adsense medium -->
Here is the Adsense ad code
<!-- Adsense medium -->
<br />
<div id="arabes1">
You will be redirected to the link after <span id="countdown"> 10 </span> Seconds
<i class="fa fa-spinner fa-spin" style="font-size: 45px;"></i>
<a href="https://www.blogger.com/u/1/blogger.g?blogID=1043534872206554421#" id="reload"></a>
</div>
<br />
<!-- The second text -->
Here is the text that appears on the page
<!-- Adsense medium -->
<!-- Ads are down below -->
Here is the Adsense ad code
<!-- Ads are down below -->
<!-- The third text -->
Here is the text that appears on the page
<!-- The third text -->
</div>
<script type="text/javascript">//<![CDATA[
//add Font Awesome
var cb = function() {
var l = document.createElement('link'); l.rel = 'stylesheet';
l.href = '//maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css';
var h = document.getElementsByTagName('head')[0]; h.parentNode.insertBefore(l, h);
};
var raf = requestAnimationFrame || mozRequestAnimationFrame ||
webkitRequestAnimationFrame || msRequestAnimationFrame;
if (raf) raf(cb);
else window.addEventListener('load', cb);
//]]></script>
<script type="text/javascript">
var seconds;
var temp;
function removem1() {
var xkl = getQueryVariable("url");
var nkl=xkl.replace("&m=1", "");
document.getElementById("reload").innerHTML=nkl;
}
removem1();
document.getElementById('reload').href=window.location.href;
function getQueryVariable(variable)
{
var query = window.location.search.substring(1);
var vars = query.split("?&&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=_");
if(pair[0] == variable){return pair[1];}
}
return(false);
}
function countdown() {
seconds = document.getElementById('countdown').innerHTML;
seconds = parseInt(seconds, 10);
if (seconds == 0) {
temp = document.getElementById('countdown');
parent.location.replace(document.getElementById("reload").innerHTML)
return;
}
seconds--;
temp = document.getElementById('countdown');
temp.innerHTML = seconds;
timeoutMyOswego = setTimeout(countdown, 1500);
}
setTimeout(function(){ countdown(); }, 5000);
</script>
</div>
After saving, we go to the html and search for "</ body>" and add the following code over it directly
<script type='text/javascript'>
//<![CDATA[
var allahref=document.getElementsByTagName("a");
for(var c=0;c<allahref.length;c++)
{
if(allahref[c].hostname!="http://bit.ly/34YniMJ" && allahref[c].hostname!="")
if(allahref[c].hostname!="www.facebook.com" && allahref[c].hostname!="")
if(allahref[c].hostname!="www.youtube.com" && allahref[c].hostname!="")
if(allahref[c].hostname!="plus.google.com" && allahref[c].hostname!="")
if(allahref[c].hostname!="www.instagram.com" && allahref[c].hostname!="")
if(allahref[c].hostname!="twitter.com" && allahref[c].hostname!="")
if(allahref[c].hostname!="1.bp.blogspot.com" && allahref[c].hostname!="")
if(allahref[c].hostname!="2.bp.blogspot.com" && allahref[c].hostname!="")
if(allahref[c].hostname!="3.bp.blogspot.com" && allahref[c].hostname!="")
if(allahref[c].hostname!="4.bp.blogspot.com" && allahref[c].hostname!="")
if(allahref[c].hostname!="www.blogger.com" && allahref[c].hostname!="")
if(allahref[c].hostname!="www.linkedin.com" && allahref[c].hostname!="")
if(allahref[c].hostname!="play.google.com" && allahref[c].hostname!="")
{
allahref[c].href="https://sample-nqnia2.blogspot.com/p/redirect.html??&&url=_"+allahref[c].href;
}
}
//]]>
</script>
ليست هناك تعليقات