Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Anti-pony script v0.3, (c) 2013 CrazyRussian
- Установить как UserJS скрипт для оперы.
- */
- var Users = new Array("Skaarj","FiEctro","Raid","XaeroX","ForestGirl","St.Snoop","PekpyT","shtopor7","A[KUSH]ER","FARSH","GetCracked","PoD-Stas","noSICK","Hedgehog","XAN","Nuclear");
- function ZeroPaddedStr(str,zeroes)
- {
- ret = str;
- while(ret.length < zeroes)
- ret = "0" + ret;
- return ret;
- }
- function GetCatPicture()
- {
- var index = (Math.floor(1 + Math.random() * (2 - 1) + 0.5));
- switch(index)
- {
- case 3:
- return "http://dl.ziza.ru/other/022010/02/koshki/" + ZeroPaddedStr((Math.floor(1 + Math.random() * (98 - 1) + 0.5)).toString(),3) + ".jpg";
- case 2:
- return "http://art.mau.ru/foto_cats/cats/" + ZeroPaddedStr((Math.floor(1 + Math.random() * (12 - 1) + 0.5)).toString(),3) +".jpg"
- }
- }
- (function() {
- opera.addEventListener('BeforeEvent.DOMContentLoaded',
- function(ev)
- {
- clear_pics = false;
- title = new String(document.title);
- if (title.indexOf("My Little Pony: Friendship is Magic") != -1)
- {
- clear_pics = true;
- }
- for (var i = 0 ; i < document.images.length ; i++)
- {
- var title = new String(document.images[i].title);
- var path = new String(document.images[i].src);
- if (path == "http://cs-mapping.com.ua/news/upload/4401e07df95c02f71b318db5e2945014.jpg")
- {
- document.images[i].src = GetCatPicture();
- document.images[i].width = "409";
- document.images[i].height = "245";
- continue;
- }
- if (clear_pics && path.indexOf("cs-mapping.com.ua") == -1)
- {
- document.images[i].src = GetCatPicture();
- continue;
- }
- for(var j = 0 ; j < Users.length; j++)
- {
- if (title.indexOf(Users[j]) == -1) continue;
- if (path.indexOf("customavatars") == -1) continue;
- document.images[i].src = GetCatPicture();
- document.images[i].width = "180";
- document.images[i].height = "200";
- break;
- }
- }
- }
- , true);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement