mamba.** button control

Button control for basic function, such as: Open next - press 0, Like person - press 1, Dislike(skip) - press 2.

Stan na 09-11-2018. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==

// @name            mamba.** button control
// @name:en         mamba.** button control
// @name:ru         mamba.** управление нажатием кнопок
// @version         1.0.0
    //next page result
// @description  Button control for basic function, such as: Open next - press 0, Like person - press 1, Dislike(skip) - press 2.
// @description:en  Button control for basic function, such as: Open next - press 0, Like person - press 1, Dislike(skip) - press 2.
// @description:ru  Управление нажатием кнопок для основных функций, как: открыть следующую страницу - нажмите 0, Лайк - нажмите 1, Дизлайк(пропустить) - нажмите 2. 

// @author          Paul Malyarevich
// @contributor     malyarevich

// @connect         mamba.ua
// @include         https://*.mamba.ua/*
// @include         https://*.mamba.ru/*
// @include         https://*.mamba.com/*
// @include         https://*.mamba.us/*
// @include         https://*.mamba.net/*
// @include         https://*.mamba.uk/*
// @include         https://*.mamba.pl/*
// @include         https://apps.facebook.com/mamba/*
// @include         https://vk.com/mamba?*
// @include         https://*.mamba.*/

// @run-at          document-start
// @encoding        utf-8
// @namespace       https://greasyfork.org/users/217675

// ==/UserScript==

document.addEventListener("keydown", function(e){
	if(e.view.stats.scriptName === "mamba:/search.phtml" || document.getElementById("Anketa_Info") ) {
		if(e.key === "0") {
			console.log("SEARCH")
			document.querySelector(".b-tile .b-tile__link:first-child").click();
		}
	}
	if(e.view.stats.scriptName === "mamba:/dispatcher.php" && !document.getElementById("Anketa_Info")) {
	
		console.log("DATING")
		if(e.key === "1") {
			document.querySelector(".photo-vote-ctrl-section-text").click();
		}
		if(e.key === "2") {
			document.querySelector(".button_white_zone .photo-vote-ctrl-section-link:last-child").click();
		}
	}
});