Youtube Fix (projanmo)

Youtube fix for projanmo forum

  1. // ==UserScript==
  2. // @name Youtube Fix (projanmo)
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Youtube fix for projanmo forum
  6. // @author Saiful Isalm
  7. // @match https://forum.projanmo.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. $.each($("p>object a"), function() {
  14. var url = $(this).attr('href').replace('http://', 'https://');
  15. url = url.replace('watch?v=', 'embed/');
  16. var html = '<iframe width="640" height="360" src="' + url + '" frameborder="0" allowfullscreen></iframe>';
  17. $(this).parents("p:first").html(html);
  18. });
  19. })();