Advertisement
Techno

Blogger NCR widget

Feb 1st, 2012
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.   jQuery(document).ready(function(){
  3.   // Set my blog domain
  4.   var myblog = 'technoslab';
  5.   // Display if not on .com domain
  6.   if(window.location.hostname!=myblog+'.blogspot.com'){
  7.     // Show message
  8.     jQuery("#ncr_msg").html("Not on "+myblog+".blogspot<u>.com</u> ? <a href='#' id='ncr'>Click me</a> / <a href='http://technoslab.blogspot.com/2012/02/how-to-prevent-your-blog-from.html'>Read more</a>");
  9.     // Process if user wishes to go to the non country specific domain
  10.     jQuery("#ncr").click(function(){
  11.       document.cookie="NCR=1";
  12.       document.location = 'http://'+myblog+'.blogspot.com/ncr'+document.location.pathname;
  13.     });
  14.   }
  15. });
  16. </script>
  17. <br />
  18. <br />
  19. <div id="ncr_msg"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement