Advertisement
Guest User

Untitled

a guest
Jan 1st, 2013
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var busuk  = /busuk\.org\/ping\/view/i;
  2. var apesal  = /apesal\.com\/rd/i;
  3. var blogged = /blogged\.my\/pingbar-/i;
  4. var bloggedre = /blogged\.my\/ping-/i;
  5. var blogr  = /blogr\.my\/fr/i;
  6. var blogrre  = /blogr\.my\/go/i;
  7. var gilaping  = /gilaping\.com\/lihat/i;
  8.  
  9. var site = '';
  10. if (busuk.exec(window.location) !== null) {
  11.     site = 'busuk';
  12. } else if (apesal.exec(window.location) !== null) {
  13.     site = 'apesal';
  14. } else if (blogged.exec(window.location) !== null) {
  15.     site = 'blogged';
  16. } else if (bloggedre.exec(window.location) !== null) {
  17.     site = 'bloggedre';
  18. } else if (blogr.exec(window.location) !== null) {
  19.     site = 'blogr';
  20. } else if (blogrre.exec(window.location) !== null) {
  21.     site = 'blogrre';
  22. } else if (gilaping.exec(window.location) !== null) {
  23.     site = 'gilaping';
  24. }
  25.  
  26. switch (site) {
  27.     case 'busuk':case 'blogrre':
  28.         var iframe = document.getElementsByTagName('iframe')[0].src;
  29.  
  30.         if (iframe !== null || iframe !== 'undefined') {
  31.             window.location = iframe;
  32.         }
  33.     break;
  34.     case 'apesal':case 'blogged':
  35.         var iframe = getElementsByClassName('page_content')[0].src;
  36.  
  37.         if (iframe !== null || iframe !== 'undefined') {
  38.             window.location = iframe;
  39.         }
  40.     break;
  41.     case 'bloggedre':
  42.         var newurl = window.location.href.replace(/ping/gi, 'pingbar');
  43.  
  44.         window.location = newurl;
  45.     break;
  46.     case 'blogr':
  47.         var iframe = document.getElementById('pingframe');
  48.         if (iframe !== null) {
  49.             window.location = iframe.src;
  50.         }
  51.     break;
  52.     case 'gilaping':
  53.         var links = getElementsByClassName("button");
  54.  
  55.         if (links[3].href !== null) {
  56.             window.location = links[3].href;
  57.         }
  58.     break;
  59. }
  60.  
  61. function getElementsByClassName(classname)  {
  62.     node = document.getElementsByTagName("body")[0];
  63.     var a = [];
  64.     var re = new RegExp('\\b' + classname + '\\b');
  65.     var els = node.getElementsByTagName("*");
  66.     var j = els.length;
  67.     for (var i = 0; i < j; i++) {
  68.         if (re.test(els[i].className)) {
  69.             a.push(els[i]);
  70.         }
  71.     }
  72.  
  73.     return a;
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement