The most useful script EVER!

The most useful script EVER! Press ^ to enable it.

Από την 23/05/2025. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         The most useful script EVER!
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  The most useful script EVER! Press ^ to enable it.
// @author       @theyhoppingonme on discord
// @match        *://*/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    // check if a key is pressed
     document.addEventListener('keydown', (e) => {
         // if the key is pressed continue
  if (e.key == '^') {
      // define the function
    function draw_shape(x, y, shape, color, size) {
        // create the div
  const shapeDiv = document.createElement("div");
  shapeDiv.style.position = "absolute";
        // set its x and y position
  shapeDiv.style.left = `${x}px`;
  shapeDiv.style.top = `${y}px`;
        // set the color
  shapeDiv.style.backgroundColor = color;
        // make the shape be ontop of everything
  shapeDiv.style.zIndex = 9999;
// check the shape
  switch (shape.toLowerCase()) {
    case "circle":
      shapeDiv.style.width = `${size * 2}px`;
      shapeDiv.style.height = `${size * 2}px`;
      shapeDiv.style.borderRadius = "50%";
      break;

    case "square":
      shapeDiv.style.width = `${size}px`;
      shapeDiv.style.height = `${size}px`;
      break;

    case "triangle":
      shapeDiv.style.width = "0";
      shapeDiv.style.height = "0";
      shapeDiv.style.borderLeft = `${size}px solid transparent`;
      shapeDiv.style.borderRight = `${size}px solid transparent`;
      shapeDiv.style.borderBottom = `${size * 2}px solid ${color}`;
      shapeDiv.style.backgroundColor = "transparent";
      break;

    default:
      console.error("Unsupported shape:", shape);
      return;
  }
  // create it
  document.body.appendChild(shapeDiv);
}
// premade shapes
const shapes = [
  [662, 463, "#FED597", 25],
  [700, 463, "#FED597", 25],
  [681, 440, "#FED597", 25],
  [683, 420, "#FED597", 22],
  [683, 400, "#FED597", 23],
  [685, 390, "#F59E9E", 21],
];
// create the shapes
shapes.forEach(([x, y, color, r]) => draw_shape(x, y, "circle", color, r));
// create a line
for (let y = 390; y <= 420; y += 5) {
  draw_shape(702, y, "circle", "#000000", 5);
}
  }
});

})();