Skip to content

Instantly share code, notes, and snippets.

@happiness801
Last active November 26, 2023 21:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save happiness801/8a2892889d5a1a271ce4c3930c10fd67 to your computer and use it in GitHub Desktop.
Save happiness801/8a2892889d5a1a271ce4c3930c10fd67 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Generic Streaming Site Improvements
// @namespace http://onai.net/
// @version 0.2
// @description Removing junk for Generic Streaming Sites
// @author Kevin Gwynn
// @match https://dudestream.com/*
// @match http://dudestream.com/*
// @match https://embedstream.me/*
// @match https://crackstreams.biz/*
// @grant none
// ==/UserScript==
(function() {
// Make sure jQuery is available
var gen = 0;var act=function(){gen=1;var script=document.createElement('script');script.src='//code.jquery.com/jquery-1.11.0.min.js';script.type='text/javascript';document.getElementsByTagName('head')[0].appendChild(script);};(!window.jQuery)?act():1;setTimeout(function(){console.log('jQuery '+(gen?'loaded: ':'existing: ')+(window.jQuery?jQuery().jquery:'no jQuery/load failed'));}, 500);
var fixStuff = function() {
console.log('KAG: Generic Streaming Site Improvements...');
// Disable window.open
window.open = function(a) { console.log('KAG: window.open called: ' + a); };
// Remove links with targets
let links = document.getElementsByTagName('a');
for (let x = 0; x < links.length; x++) {
if (links[x].target != '') links[x].removeAttribute('target');
}
if (typeof jQuery === 'undefined') return;
// Remove "overlays"
jQuery('[id$=overlay]').remove();
// Dudestream; no-adblock overlay; NOTE: removing this element causes the page to refresh so just hide it
jQuery('[id^=word1]').css('display', 'none');
jQuery('#time, aside, img, header, footer, .dudes-ads').remove();
myTimer = function() { };
jQuery('body').append('<div id="time"></div>');
// Crackstreams
// <div id="dontfoid" znid="4004667" style="top: 0px; left: 0px; width: 1710px; height: 951px; position: fixed; z-index: 2147483647;"></div>
jQuery('#dontfoid').remove();
jQuery('iframe[src*="chatango.com"]').closest('div.col-3, div.col-sm-3').remove();
jQuery('div[id*="ytsubscribe"]').remove();
jQuery('div#crackstreams > div').css('height', '80%');
jQuery('div#crackstreams > div').css('width', '100%');
jQuery('div#crackstreams').closest('div.col-sm-9, div.col-sm-3').removeClass('col-sm-9 col-sm-3');
//jQuery('div.container').removeClass('container');
// Idea... remove all iFrames except for an "allow list"?
}
fixStuff();
setTimeout(fixStuff, 2000);
setTimeout(fixStuff, 5000);
setTimeout(fixStuff, 8000);
setTimeout(fixStuff, 15000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment