Greasy Fork

Greasy Fork is available in English.

mamba.** button control

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

当前为 2018-11-09 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==

// @name            mamba.** button control
// @name:en         mamba.** button control
// @name:ru         mamba.** управление нажатием кнопок
// @version         1.0.1
    //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         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       http://greasyfork.icu/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();
		}
	}
});