Last active
August 29, 2015 14:26
-
-
Save davur/04b50c3ab58c8e433020 to your computer and use it in GitHub Desktop.
PyConAU 2015 - Load all talk abstracs into the programme page
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
// Licence: Do with this as you see fit. All copyright released | |
// Author: Davur Clementsen (Twitter @davur, I love feedback) | |
// Load all talk abstracs into the programme page. | |
// | |
// Try out when viewing the PyConAu schedule for Saturday and Sunday: | |
// - http://2015.pycon-au.org/programme/schedule/Saturday | |
// - http://2015.pycon-au.org/programme/schedule/Sunday | |
// | |
// How to use: | |
// Copy this snippet to the dev console when viewing on a programme page. | |
// | |
// Best viewed in full screen | |
// First off a helper function for later | |
// function to load external url, extract jquery selector and | |
// append to cotnainer | |
function appendExternal(element, url, selector) { | |
$.ajax({ | |
type: "GET", | |
url: url, | |
success: function(resp) { | |
$content = $(selector, resp); | |
element.append($content); | |
} | |
}); | |
} | |
// Now clean some clutter | |
$('.three').remove(); | |
$('.two').remove(); | |
$('.seven').removeClass('seven').addClass('twelve'); | |
$('#programme td, #programme th').css('vertical-align', 'top'); | |
// Now load all programme links into programme page | |
$('#programme a').each(function() { | |
$this = $(this); | |
$container = $this.closest('td'); | |
url = $this.attr('href'); | |
appendExternal($container, url, '#proposal .abstract'); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment