Skip to content

Instantly share code, notes, and snippets.

@tjadhav
Last active July 17, 2019 13:38
Show Gist options
  • Save tjadhav/4c1cb04e26809b336d076918f13945c1 to your computer and use it in GitHub Desktop.
Save tjadhav/4c1cb04e26809b336d076918f13945c1 to your computer and use it in GitHub Desktop.
Hotstar 5-minutes preview killer
// ==UserScript==
// @name Hotstar
// @namespace https://hotstar.com/
// @version 0.1
// @description Premium
// @author Tushar
// @match https://www.hotstar.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '.info-wrapper > .info { position: fixed !important; left: 10px; color: red; }';
document.head.appendChild(style);
function _clear() {
const json = JSON.parse(localStorage.getItem('sportlivetimeentries'));
const obj = JSON.parse(json.nofreeluncheon);
const keys = Object.keys(obj);
const key = keys[keys.length - 1];
obj[key].elapsedTime = -100000000;
obj[key].firedReachedPaywallEvent = false;
obj[key].timestamp -= 100000000;
json.nofreeluncheon = JSON.stringify(obj);
localStorage.setItem('sportlivetimeentries', JSON.stringify(json));
}
setInterval(_clear, 200);
_clear();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment