Created
September 15, 2017 23:46
-
-
Save nitishn/75149a338b3ac0f9ff64014461145f59 to your computer and use it in GitHub Desktop.
This file contains 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
// This is a script to help win https://carntech.com/jackie.html | |
// Note: Level 3 and 7 don't work correctly...so guess those correctly and the remaining levels work correctly | |
setTimeout( function() { | |
var pieces = document.getElementsByClassName('piece'); | |
var notJackieUrls = [ | |
'kelsey', | |
'guy', | |
'poe', | |
'will', | |
'ben', | |
'jon', | |
'toothpaste', | |
'pizza', | |
'prince', | |
'lamp', | |
'drake', | |
'bruce', | |
'yao', | |
'ken', | |
'psy', | |
'kenw', | |
'xi', | |
'randall', | |
'kenj', | |
'john', | |
]; | |
Array.from(pieces).forEach(function(item) { | |
var url = item.style.backgroundImage; | |
var found = false; | |
notJackieUrls.forEach( function(blacklistItem) { | |
var r1 = "static\/media\/" + blacklistItem + ".*" | |
if(new RegExp(r1).test(url)) { | |
// item.style.opacity = .1; | |
found = true | |
} | |
}); | |
if (found) item.style.opacity = .5; | |
else item.style.opacity = 1; | |
}); | |
}, 200) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment