Auto-reload FilmOn streams at each timeout

This script allows you to auto-reload a FilmOn stream at each timeout

Fra 06.02.2023. Se den seneste versjonen.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name            Auto-reload FilmOn streams at each timeout
// @namespace       https://github.com/GavinBrelstaff
// @description     This script allows you to auto-reload a FilmOn stream at each timeout
// @match           http://www.filmon.com/channel/*
// @version         1.0
// @license         GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// ==/UserScript==

setInterval(function() // Polling 
{ 
  var el = document.querySelector( 'div.tvg-count.countdown[secs]' );
      
   if( el )
   {
     var  secs = el.getAttribute('secs');
      console.log('secs: ' + secs );
      if( secs < 6 ) location.href = location.href; // reload the page
   } 

}, 1000);  // every second