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
window.setInterval( | |
() => document.querySelectorAll('.build-status.failed') | |
.forEach(build => { | |
console.log('Restarting build') | |
document.querySelector('.action-button--restart').click() | |
}), | |
5000 | |
) |
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
let d = new Date(); | |
// obtém a representação em string | |
let str = d.toString(); // 'Wed Jan 17 2018 16:15:42' | |
// obtém a representação numérica, número em milisegundos desde a época do Unix | |
let num = d.valueOf(); // 1516198542525 | |
// comparara com uma representação de string | |
// é true, pois "d" foi convertido para a mesma string |