Created
November 6, 2016 20:17
-
-
Save nikhiljha/9cffdc27af45af1697733c7ec18f0623 to your computer and use it in GitHub Desktop.
Cheat at crabhat's spyfall if you want.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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 + "."); | |
} | |
})(); |
Looks like "Players" is no longer the correct variable :(
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
What do you do with the script?