Skip to content

Instantly share code, notes, and snippets.

@Niceblack
Created November 9, 2016 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Niceblack/fc6bc0226c57862c75e5f48b8e24a195 to your computer and use it in GitHub Desktop.
Save Niceblack/fc6bc0226c57862c75e5f48b8e24a195 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Moonwalk.cc Player
// @description Remove AdBlock detection, skip timer
// @namespace Moonwalk
// @include http://moonwalk.cc/*/iframe*
// @include http://onlinevideo.anilibria.tv/serial/*/iframe*
// @include http://pandastream.cc/video/*/iframe*
// @version 1
// @grant none
// @run-at document-start
// ==/UserScript==
"use strict";
window.addEventListener('beforescriptexecute', function thisFunc(e) {
if (e.target.innerHTML.search(/request_host/) != -1) {
e.preventDefault();
e.stopPropagation();
var code = e.target.innerHTML;
// Magic
code = code.replace("var adv_enabled = true;",
"var adv_enabled = false;");
window.removeEventListener(e.type, thisFunc, true);
appendScript(code);
}
}, true);
function appendScript(s) {
document.head.appendChild(document.createElement('script')).innerHTML = s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment