PlayPuls Player Switcher Beta

The script replaces the original playpuls.pl player with the classic HTML5 player.

  1. // ==UserScript==
  2. // @name PlayPuls Player Switcher Beta
  3. // @name:pl Zmiana odtwarzacza PlayPuls na domyślny
  4. // @namespace http://tampermonkey.net/
  5. // @version 1.0
  6. // @description The script replaces the original playpuls.pl player with the classic HTML5 player.
  7. // @description:pl Skrypt zamienia oryginalny odtwarzacz playpuls.pl na domyślny HTML5.
  8. // @author DaveIT
  9. // @match https://playpuls.pl/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. function init() {
  17. var video = document.querySelector('video');
  18.  
  19. if(video) {
  20. video.controls = true;
  21.  
  22. var player = document.querySelector('.player2');
  23. player.innerHTML = '';
  24. player.className = 'JustPlayIT';
  25. player.appendChild(video);
  26. }
  27. }
  28.  
  29. var readyStateCheckInterval = setInterval(function() {
  30. if (document.readyState === "complete") {
  31. clearInterval(readyStateCheckInterval);
  32. init();
  33. }
  34. }, 10);
  35.  
  36. })();