aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2022-05-09 19:17:32 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2022-05-09 19:17:32 +0200
commitf6f3458611d0a4e4d85ade4a4d28e03d600f7455 (patch)
tree6f95b82427ac6034706a659611e134245ffc8763
downloadnot-your-business-f6f3458611d0a4e4d85ade4a4d28e03d600f7455.tar.xz
Initial commit
-rw-r--r--README.md3
-rw-r--r--content.js10
-rw-r--r--manifest.json15
3 files changed, 28 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f9c94e0
--- /dev/null
+++ b/README.md
@@ -0,0 +1,3 @@
+# not your business, 4anime
+Prevents 4anime from redirecting you to front page whenever devtools are opened.
+Also remember to disable debugger breakpoints, or else it will still redirect you.
diff --git a/content.js b/content.js
new file mode 100644
index 0000000..afc0aaa
--- /dev/null
+++ b/content.js
@@ -0,0 +1,10 @@
+const script = document.createElement("script")
+script.innerHTML = "console.log = console.clear = _ => {}"
+
+new MutationObserver(mutations =>
+ mutations.forEach(mutation =>
+ mutation.addedNodes.forEach(node => {
+ if (node.tagName == "HEAD")
+ node.appendChild(script)
+ })))
+ .observe(document, {childList: true, subtree: true})
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..38b593d
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,15 @@
+{
+ "manifest_version": 2,
+ "name": "Not your business",
+ "version": "1.0",
+ "description": "Prevents 4anime from redirecting you to front page whenever devtools are opened.",
+ "icons": {},
+ "content_scripts": [
+ {
+ "matches": ["*://4anime.gg/*", "*://rapid-cloud.ru/*"],
+ "js": ["nyb.js"],
+ "run_at": "document_start",
+ "all_frames": true
+ }
+ ]
+}