Last active
July 1, 2017 09:56
-
-
Save hejmsdz/34d1ed9755ce2bc840372ff02e0371c1 to your computer and use it in GitHub Desktop.
Oczekiwanie na wyniki z MP
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
(function(album) { | |
var intvl = setInterval(function() { | |
fetch('Metody_probabilistyczne_-__wiczenia_2016_17.html').then(x => x.text()).then(function(data) { | |
var dom = new DOMParser().parseFromString(data, "text/html"); | |
document.body.innerHTML = dom.getElementsByTagName('body')[0].innerHTML; | |
var tr = [].slice.call(dom.querySelectorAll('tr')).filter(tr => tr.firstChild.innerHTML == album)[0].lastChild.innerHTML; | |
if (tr != ' ') { | |
clearInterval(intvl); | |
alert(tr); | |
} else console.log('jeszcze nie ma'); | |
}); | |
}, 5*60*1000); | |
})('TU WPISZ SWÓJ NUMER ALBUMU'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment