Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Reactor Redirect
- // @version 1.0
- // @description Redirects to .onion site if post is censored.
- // @match https://old.reactor.cc/*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- const observer = new MutationObserver((mutations) => {
- mutations.forEach((mutation) => {
- if (mutation.addedNodes) {
- mutation.addedNodes.forEach((node) => {
- if (node.nodeType === Node.ELEMENT_NODE && node.textContent.includes("Реактор вернул все еще зацензуренный пост")) {
- const currentUrl = window.location.href;
- if (currentUrl.startsWith("https://old.reactor.cc/post/")) {
- const newUrl = currentUrl.replace("https://old.reactor.cc", "http://reactorccdnf36aqvq34zbfzqyrcrpg3eyhilauovitrvmcjovsujmid.onion");
- window.location.href = newUrl;
- }
- }
- });
- }
- });
- });
- observer.observe(document.body, { childList: true, subtree: true });
- })();
Add Comment
Please, Sign In to add comment