Randomizer

Predictable winner generation for https://vk.com/app4938347

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Randomizer
// @version      0.2
// @match        *://randomizer.shilov.dev/*
// @description  Predictable winner generation for https://vk.com/app4938347
// @author       Kaimi
// @homepage     https://kaimi.io/2016/01/tampering-vk-contest-results/
// @namespace    https://greasyfork.org/users/228137
// @license      GPLv3
// ==/UserScript==

var bReplacePhoto = false; // Replace photo of the winner with the provided URL
var winnersList =
[
	['Максим Антонов', 'https://pp.userapi.com/c638823/v638823253/43120/RuiiVVlULKc.jpg'],
	['Петр Андреев', 'https://pp.userapi.com/c638823/v638823253/43120/RuiiVVlULKc.jpg'],
	['Илья Новиков', 'https://pp.userapi.com/c638823/v638823253/43120/RuiiVVlULKc.jpg']
];

var getWinnerHTMLPtr = getWinnerHTML;

getWinnerHTML = function(winner)
{
	if(winnersList.length > 0)
	{
		var currentWinner = winnersList.shift();
		var userName = currentWinner[0].split(" ");

		winner.first_name = userName[0];
		winner.last_name = userName[1];

		if(bReplacePhoto)
			winner.photo_50 = currentWinner[1];
	}

	return getWinnerHTMLPtr(winner);
};