Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var busuk = /busuk\.org\/ping\/view/i;
- var apesal = /apesal\.com\/rd/i;
- var blogged = /blogged\.my\/pingbar-/i;
- var bloggedre = /blogged\.my\/ping-/i;
- var blogr = /blogr\.my\/fr/i;
- var blogrre = /blogr\.my\/go/i;
- var site = '';
- if (busuk.exec(window.location) !== null) {
- site = 'busuk';
- } else if (apesal.exec(window.location) !== null) {
- site = 'apesal';
- } else if (blogged.exec(window.location) !== null) {
- site = 'blogged';
- } else if (bloggedre.exec(window.location) !== null) {
- site = 'bloggedre';
- } else if (blogr.exec(window.location) !== null) {
- site = 'blogr';
- } else if (blogrre.exec(window.location) !== null) {
- site = 'blogrre';
- }
- switch (site) {
- case 'busuk':case 'blogrre':
- var iframe = document.getElementsByTagName('iframe')[0].src;
- if (iframe !== null || iframe !== 'undefined') {
- window.location = iframe;
- }
- break;
- case 'apesal':case 'blogged':
- var iframe = getElementsByClassName('page_content')[0].src;
- if (iframe !== null || iframe !== 'undefined') {
- window.location = iframe;
- }
- break;
- case 'bloggedre':
- var newurl = window.location.href.replace(/ping/gi, 'pingbar');
- window.location = newurl;
- break;
- case 'blogr':
- var iframe = document.getElementById('pingframe');
- if (iframe !== null) {
- window.location = iframe.src;
- }
- break;
- }
- function getElementsByClassName(classname) {
- node = document.getElementsByTagName("body")[0];
- var a = [];
- var re = new RegExp('\\b' + classname + '\\b');
- var els = node.getElementsByTagName("*");
- var j = els.length;
- for (var i = 0; i < j; i++) {
- if (re.test(els[i].className)) {
- a.push(els[i]);
- }
- }
- return a;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement