Skip to content

Instantly share code, notes, and snippets.

@Duologic
Last active August 29, 2015 14:26
Show Gist options
  • Select an option

  • Save Duologic/e2b7c0ca195ec207a007 to your computer and use it in GitHub Desktop.

Select an option

Save Duologic/e2b7c0ca195ec207a007 to your computer and use it in GitHub Desktop.
var body = document.getElementsByTagName("body")[0];
var script = document.createElement('script');
script.type = "text/javascript";
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js";
body.appendChild(script);
var textarea = document.createElement('textarea');
textarea.id = "data";
$(textarea).css('position', 'absolute');
$(textarea).css('width', '500px');
$(textarea).css('height', '90%');
$(textarea).css('top', '10px');
$(textarea).css('z-index', '10000');
body.appendChild(textarea);
timetable = $('.schedule__stage');
$('#data').html('');
$.each(timetable, function(i, stage){
$('#data').append($(stage).children('.schedule__stage-title').html() + "\n");
acts = $(stage).children('.schedule__act');
$.each(acts, function(i, act){
acttime = $(act).find('small').html()
actname = $(act).find('a').html();
if($(act).hasClass('schedule__act--active')){
actname = "* " + actname + " *";
}
$('#data').append(" " + acttime + " " + actname + "\n");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment