Skip to content

Instantly share code, notes, and snippets.

@renatosnrg
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save renatosnrg/dab2434b7c526f25ac24 to your computer and use it in GitHub Desktop.

Select an option

Save renatosnrg/dab2434b7c526f25ac24 to your computer and use it in GitHub Desktop.
Monitor ticket availability at Fifa.com Ticketing System site: https://fwctickets.fifa.com/ticketingsystem.aspx?l=en#Tck2
/*
Monitor ticket availability at Fifa.com Ticketing System site
Run this code at https://fwctickets.fifa.com/ticketingsystem.aspx?l=en#Tck2
(use the console available in any browser developer inspector)
- configure the timeout between refreshes and the matches you want to monitor
- when any available ticket is found a beep sound is played and the refresh stops
*/
function checkTicket() {
/* configure the timeout in miliseconds */
var timeout = 3000;
/* configure the matches you want to monitor */
var matches = ['55', '62', '49'];
/* beep url */
var beepUrl = "https://www.proxy-service.de/proxy-service.php?u=http%3A%2F%2Fsoundbible.com%2Fmp3%2FMorse%2520Code-SoundBible.com-810471357.mp3&b=0&f=norefer";
function isAvailable() {
for(var i =0; i < matches.length; i++) {
var match = matches[i];
if ($('#IMT' + match + ' span[data-content~="badge"]').size() > 0) {
return true;
}
}
return false;
}
function playSound() {
var snd = new Audio(beepUrl);
snd.play();
}
function check() {
if (isAvailable()) {
playSound();
console.log('Some ticket is available!');
} else {
checkTicket();
}
}
refreshAvailability_new();
setTimeout(check, timeout);
}
checkTicket();
@kfran
Copy link

kfran commented Jul 2, 2014

Vai ter alguma atualização no script com a atualização do site da fifa?

@fmvivas
Copy link

fmvivas commented Jul 2, 2014

This script doesn't work anymore...
Any ideas on how to get it to work again?

@yvenscolbert
Copy link

Fix for the recent update on fifa ticketing system.
https://gist.github.com/yvenscolbert/977dbd37ceb26b453ae9

@rokam
Copy link

rokam commented Jul 8, 2014

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