Randomizer

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

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

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