Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name ComboHateScript
- // @namespace odnoklassniki
- // @description tvoi mama ibalj
- // @include http://www.odnoklassniki.ru/online
- // @include http://odnoklassniki.ru/online
- // @include https://ok.ru/online
- // @version 1.0.2017
- // @grant none
- // ==/UserScript==
- var initialWaitTime = 5000,
- reloadWaitTime = 2000,
- popupWaitTime = 1000,
- photoLoadWaitTime = 2500,
- closeWaitTime = 1000,
- fetchWaitTime = 3000,
- minAge = "14", // >= 14
- maxAge = "29", // <= 99
- cityList = [ "Грозный", "Урус-Мартан", "Гудермес", "Хасавюрт", "Дербент", "Махачкала" ],
- phraseList = [ "Э гандон, я твою маму ебал",
- "Сука, маму твою ебал",
- "Ну и пидрила",
- "Ну и урод!",
- "Ты че, пидор что ли?",
- "Фу бля!",
- "Хач",
- "Я твой рот ебал, пидор дырчатый",
- "Твоя мать – шлюха",
- "Сломал бы тебе ебало за такие фотографии",
- "Вот я тебя и нашёл, пидор",
- "Ну чё, когда мне тебе очко сломать?",
- "Че за гомик?",
- "Гомосек 100%",
- "Мразь, мать твою шпекал",
- "Хуйло немытое",
- "Иди взорвись",
- "Говно какое-то" ];
- document.getElementsByClass = function(tagName, className) {
- var itemsfound = new Array,
- elems = document.getElementsByTagName(tagName),
- i;
- for(i = 0; i < elems.length; ++i) {
- if(elems[i].className === className) {
- itemsfound.push(elems[i]);
- }
- }
- return itemsfound;
- };
- function processPhoto (photos) {
- var evObj;
- if (photos.length === 0) {
- setTimeout(doScript, reloadWaitTime);
- return;
- }
- evObj = document.createEvent('MouseEvents');
- evObj.initEvent('mouseover', true, false);
- photos[0].children[0].children[0].dispatchEvent(evObj);
- setTimeout(function () {
- var photoLink = document.getElementsByClass("a", "gwt-shortcutMenu-iconlink-item")[0].children[0];
- photoLink.click();
- }, popupWaitTime);
- setTimeout(function () {
- var commentBlock = document.getElementsByClass("div","itx_w")[0],
- commentEditField,
- commentButton,
- dislikeBlock = document.getElementsByClass("a", "marks-new_ic __val-1")[0],
- dislikeButton,
- closeButton = document.getElementsByClass("div", "js-photoLayerClose ic photo-layer_close")[0],
- usersOnlineButton = document.getElementsByClass("a", "sm fo4c_h_live-link fs-15")[0],
- rand = Math.floor((Math.random()*phraseList.length));
- photos.splice (0,1);
- if (dislikeBlock) {
- dislikeBlock.click();
- }
- if (commentBlock) {
- commentEditField = commentBlock.children[0];
- commentEditField.focus ();
- commentEditField = commentBlock.children[0];
- commentEditField.innerHTML = phraseList[rand];
- setTimeout (function () {
- commentButton = document.getElementsByClass("button", "button-pro form-actions_yes")[0];
- if (commentButton) {
- commentButton.click();
- }
- closeButton.click();
- setTimeout (function () {
- processPhoto (photos);
- }, closeWaitTime);
- }, popupWaitTime);
- } else if (document.getElementById ("addPrivateProfileButton")) {
- usersOnlineButton.click();
- setTimeout(doScript, reloadWaitTime);
- } else {
- closeButton.click();
- setTimeout (function () {
- processPhoto (photos);
- }, closeWaitTime);
- }
- }, photoLoadWaitTime);
- }
- function fetchPhotos () {
- var photos = document.getElementsByClass("a", "photoWrapper"),
- usersOnlineButton = document.getElementsByClass("a", "sm fo4c_h_live-link fs-15")[0];
- if (photos.length === 0) {
- usersOnlineButton.click();
- setTimeout(doScript, reloadWaitTime);
- } else {
- processPhoto (photos);
- }
- }
- function doScript() {
- var photos = document.getElementsByClass("a", "photoWrapper"),
- cityLink = document.getElementById ("onSiteNowCityLink"),
- cityEditField,
- ageSelect = document.getElementsByClass("select", "isl isl__res isl__2num"),
- minAgeSelect = ageSelect[0],
- maxAgeSelect = ageSelect[1],
- rand = Math.floor((Math.random()*cityList.length));
- minAgeSelect.value = minAge;
- maxAgeSelect.value = maxAge;
- cityLink.click ();
- cityEditField = document.getElementById ("field_city");
- cityEditField.value = cityList[rand];
- checkbox = document.getElementById ("field_female");
- checkbox.click ();
- setTimeout(fetchPhotos, fetchWaitTime);
- }
- setTimeout(doScript, initialWaitTime);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement