Website Destroyer

destroy every site

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Advertisement:

// ==UserScript==
// @name         Website Destroyer
// @namespace    http://tampermonkey.net/
// @version      2025-06-12
// @description  destroy every site
// @author       ray0kay
// @match        *://*/*
// @license      MIT
// @grant        none
// ==/UserScript==

'use strict';

const targets = [
  Object,
  Array,
  Function,
  Math,
  Reflect,
  JSON,
  Object.prototype,
  Array.prototype,
  Function.prototype,
  String.prototype,
  Number.prototype,
  Boolean.prototype,
  Date.prototype,
];

const og = {
  getOwnPropertyNames: Object.getOwnPropertyNames,
  floor: Math.floor,
  random: Math.random,
};

for (const target of targets) {
  if (target == null) continue;
  if (typeof target !== "object" && typeof target !== "function") continue;

  let props;
  try {
    props = og.getOwnPropertyNames(target);
  } catch {
    continue;
  }

  if (!Array.isArray(props)) continue;

  const functionProps = [];
  for (const p of props) {
    let val;
    try {
      val = target[p];
    } catch {
      continue;
    }
    if (typeof val === "function") {
      functionProps.push(p);
    }
  }

  for (const k of functionProps) {
    const candidates = functionProps.filter((p) => p !== k);
    if (candidates.length === 0) continue;
    const rand = candidates[og.floor(og.random() * candidates.length)];

    try {
      target[k] = target[rand];
    } catch {
      continue;
    }
  }
}