Last active
August 29, 2015 14:06
-
-
Save ppanyukov/f3f41cdf711037873589 to your computer and use it in GitHub Desktop.
Apple WWDC14 Video List hack
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
// A hacky script to work around that piece of crap WWDC14 page | |
// which does not have links to individual videos, not allows | |
// to have more than one video marked as active at the same time. | |
// | |
// Basically I went through the list of videos, picked those | |
// I think are relevant, make then "active", and then zap all | |
// the others. | |
// | |
// Simply copy/paste this into dev tools console. | |
// | |
// Screw you Apple. | |
// | |
(function screwyouapple(){ | |
var videoCategory = 'Videos related to Web and Safari'; | |
// list of session ids relevant for the web | |
var ids = [ | |
'419-video' | |
,'504-video' | |
,'517-video' | |
,'516-video' | |
,'206-video' | |
,'512-video' | |
,'506-video' | |
]; | |
var jq = document.createElement('script'); | |
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
setTimeout(function(){ | |
// Zap those not in the list, and make remaining active. | |
console.info("Showing only relevant sessions..."); | |
$('li.session').not(function(index, e){return ids.indexOf(e.id) !== -1}).remove(); | |
$('li.session').addClass('active'); | |
console.info("Done!"); | |
$('.hero').empty(); | |
$('.hero').append('<h2 style="font-size:56px; color:darkred; margin:50px 0 50px 0;">Screw you Apple</h2>'); | |
$('.hero').append('<h4 style="font-size:25px; color:black;">' + videoCategory + '</h2>'); | |
}, 1000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment