mamba.** button control

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==

// @name            mamba.** button control
// @name:en         mamba.** button control
// @name:ru         mamba.** управление нажатием кнопок
// @version         1.0.2
    //next page result - 0
    //like - 1
    //dislike - 2
// @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.*
// @include         */mamba.*
// @include         *.mamba.*
// @include         */wamba.*
// @include         *.wamba.*
// @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.*/
// @include         https://*mamba.*/
// @include         https://*wamba.*/
// @include         https://*.wamba.*/

// @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();
		}
	}
});