Advertisement
Guest User

Untitled

a guest
Mar 13th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  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/watch/2018010510520255/?2' + 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