Disable youtubeblocker

Removes the retarded "Share to View" social crap on sites that use youtubeblocker

当前为 2014-06-02 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Disable youtubeblocker
  3. // @namespace http://gipacu
  4. // @version 0.9
  5. // @description Removes the retarded "Share to View" social crap on sites that use youtubeblocker
  6. // @match http://*/*
  7. // @copyright 2014
  8. // ==/UserScript==
  9.  
  10. // @match http://www.covvotto.com*
  11. // @match http://situazionivirali.com*
  12. // @match http://esperimentisociali.it*
  13. // @match http://guardacheocchi.com*
  14.  
  15. var o = document.getElementsByClassName('image');
  16. for (var i = 0; i < o.length; i++) {
  17. var videoid = o[i].getAttribute('style');
  18. var videoid2=videoid.substring(49,60);
  19. console.log('Unblocking ' + videoid2);
  20. };
  21.  
  22. var o = document.getElementsByClassName('youtubeblocker');
  23. for (var i = 0; i < o.length; i++) {
  24. var iframe = document.createElement('iframe');
  25. iframe.src='//www.youtube.com/embed/' + videoid2 + '?rel=0';
  26. iframe.width='560';
  27. iframe.height='315';
  28. iframe.frameborder='0';
  29. iframe.setAttribute('allowfullscreen','');
  30. o[i].outerHTML=iframe.outerHTML;
  31. };
  32.  
  33.  
  34. if (window.location.href.toString().match('funnyclipe')) {
  35. blocker = document.getElementById('pampam');
  36. blocker.parentNode.removeChild(blocker);
  37. video = document.getElementById('video-wrapper');
  38. video.setAttribute('style','display:visible');
  39. }