Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var videos = $('#video'),
- sites = $('#videoLabels tbody tr'),
- visual_results = '';
- loadtime_results = '';
- // Inner functions as to not recreate them every iteration
- var title,
- fv,
- fv_location,
- fv_time_ele,
- fv_time_text,
- fl,
- fl_location,
- fl_time_ele,
- fl_time_text;
- sites.each(function(index){
- var position = index - 1;
- if(index != 0){
- title = $('.pagelink', $(this)).text();
- fv = $('tbody tr:eq(' + position + ') .thumbChanged', videos).first();
- fv_location = parseInt(fv.parents('td').index());
- fv_time_ele = $('thead tr th:eq(' + fv_location + ')', videos).prev();
- fv_time_text = fv_time_ele.text();
- fv_time_text = fv_time_text.replace('s', '');
- fl = $('tbody tr:eq(' + position + ') td:empty', videos).first();
- fl_location = parseInt(fl.index());
- fl_time_ele = $('thead tr th:eq(' + fl_location + ')', videos).prev();
- fl_time_text = fl_time_ele.text();
- fl_time_text = fl_time_text.replace('s', '');
- visual_results += index == 1 ? fv_time_text : '\n' + fv_time_text;
- loadtime_results += index == 1 ? fl_time_text : '\n' + fl_time_text;
- }
- }).promise().done(function(){
- console.log('Visual Load: \n' + visual_results);
- console.log('Final Load: \n' + loadtime_results);
- });
Add Comment
Please, Sign In to add comment