Last active
April 1, 2018 15:29
-
-
Save keckelt/27d3e12d834a943324181ee68363f6d9 to your computer and use it in GitHub Desktop.
Star Movie Bookmarklet: Reveal Times
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
javascript: | |
(function(e, s) { | |
e.src = s; | |
e.onload = function() { | |
jQuery.noConflict(); | |
console.log('jQuery injected'); | |
$('.movie-card__overlay').addClass('hover'); | |
setTimeout( function(){ | |
var date = $('#program-date-select').val(); | |
alert('Letzter Film: '+ $.map($('.movie-card[data-dates*="'+date+'"]').not('.hidden').find('.showings__content[data-date*="'+date+'"]').find('.movie-card__times-list').find('.movie-card__time'), $.text).map(time => time.split(' ')[1]).sort(function(a, b) { return (a.split(':')[0]*60+a.split(':')[1]*1) - (b.split(':')[0]*60+b.split(':')[1]*1);}).pop()); | |
}, 1000); | |
}; | |
document.head.appendChild(e); | |
})(document.createElement('script'), '//code.jquery.com/jquery-latest.min.js') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now uses currently selected date.