Advertisement
Guest User

rec-tube hax

a guest
Mar 29th, 2016
90,680
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('.thumbnail img').each(function(){
  2.     // gather info
  3.     var src = this.src,
  4.         regex = /\/images\/(.*)_default/,
  5.         id = src.match(regex)[1],
  6.         b64id = btoa(id),
  7.         link = $(this).closest('a'),
  8.         linkCt = link.closest('.images-rotation-link');
  9.  
  10.     // change link to raw mp4 URL
  11.     link.attr('href', 'https://rec-tube.com/file/' + b64id + '/');
  12.  
  13.     // disable further link rewriting by thumbnail slideshow script
  14.     linkCt.imagesRotationRemove();
  15.  
  16.     // write the video id into the page for reference
  17.     linkCt.append('<div style="word-break: break-word; text-transform: none; letter-spacing: 0;">' + id.split('/').pop()) + '</div>';
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement