Skip to content

Instantly share code, notes, and snippets.

@nikhiljha
Created November 6, 2016 20:17
Show Gist options
  • Save nikhiljha/9cffdc27af45af1697733c7ec18f0623 to your computer and use it in GitHub Desktop.
Save nikhiljha/9cffdc27af45af1697733c7ec18f0623 to your computer and use it in GitHub Desktop.
Cheat at crabhat's spyfall if you want.
// ==UserScript==
// @name SpyFall Cheater
// @namespace http://nikhiljha.com/
// @version 0.2
// @description Win every game of spyfall, every time.
// @author Nikhil Jha
// @match http://spyfall.crabhat.com/*/
// @grant none
// ==/UserScript==
(function() {
'use strict';
var zNode = document.createElement('div');
zNode.innerHTML = '<center><button id="myButton" type="button">' + 'Perform Magic</button></center>';
zNode.setAttribute ('id', 'myContainer');
document.body.insertBefore(zNode, document.body.firstChild);
document.getElementById ("myButton").addEventListener (
"click", ButtonClickAction, false
);
function ButtonClickAction (zEvent) {
Players.find({isSpy: true}).forEach(function (v) { document.getElementsByClassName('status-container')[0].append("The spy is " + v.name); });
document.getElementsByClassName('status-container')[0].append(" and everyone else is at the " + Games.findOne(Session.get('gameID')).location.name + ".");
}
})();
@gripl
Copy link

gripl commented Oct 27, 2019

Rohack, you need to get templarmonkey on google chrome but the code is outdated or something PLEASR FIX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment