Skip to content

Instantly share code, notes, and snippets.

@kamui-fin
Created April 6, 2021 12:37
Show Gist options
  • Save kamui-fin/afd9e9297e0a6c7f37cedf3b233ce58f to your computer and use it in GitHub Desktop.
Save kamui-fin/afd9e9297e0a6c7f37cedf3b233ce58f to your computer and use it in GitHub Desktop.
Hard coded subtitle blocker for 9anime
// ==UserScript==
// @name Hard Sub Blocker
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Script to block hard coded subs
// @author Kamui7
// @match https://mcloud2.to/embed/*
// @match https://streamtape.com/*
// @match https://www.mp4upload.com/*
// @match https://vidstream.pro/*
// ==/UserScript==
const blockSubs = () => {
let x = 30;
let y = 119;
let width = 240;
let height = 26;
let video = document.querySelector("video");
let div = document.createElement("canvas");
div.style.position = "absolute";
div.style.width = "100%";
div.style.height = "100%";
div.position = "absolute";
div.id = "paintpad";
video.parentNode.insertBefore(div, video.nextSibling);
// sometimes needs to be after the video
// so uncomment the following line if the bar is not showing
// video.parentNode.insertBefore(div, video);
let canvas = document.querySelector("#paintpad");
let ctx = canvas.getContext("2d");
ctx.fillStyle = "rgb(255,255,255)";
ctx.fillRect(x, y, width, height);
}
setTimeout(blockSubs, 2000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment