Guest User

Untitled

a guest
Dec 14th, 2016
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     var VF = ['webm', 'ogv', 'ogm', 'mp4', 'm4v', 'flv', "3gp"];
  2.     var AF = ["flac", "alac", "wav", "m4a", "m4r", "aac", "ogg", "mp3"];
  3.     var IF = ["jpeg", "jpg", "png", "svg", "gif"];
  4.    
  5.     function handleLinks(a) {
  6.         var f_ext, m_id;
  7.         if (a.host === 'soundcloud.com' && a.pathname) {
  8.             if (a.nextElementSibling.tagName === 'BR')
  9.                 a.nextElementSibling.remove();
  10.             jumpCont(a).appendChild(a);
  11.             SCPurePlayer.create(a);
  12.         } else
  13.         if (a.host === 'pastebin.com' && (m_id = /\/([\w_-]+)/.exec(a.pathname))) {
  14.            /* ... */
  15.         } else
  16.         if (VF.isThere((f_ext = a.href.split('.').pop()))) {
  17.             attachFile(a, 'video');
  18.         } else
  19.         if (AF.isThere(f_ext)) {
  20.             attachFile(a, 'audio');
  21.         } else
  22.         if (IF.isThere(f_ext)) {
  23.             attachFile(a, 'img');
  24.         }
  25.     }
Advertisement
Add Comment
Please, Sign In to add comment