Randomizer

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

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

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