Skip to content

Instantly share code, notes, and snippets.

@ravarcheon
Last active March 1, 2026 22:23
Show Gist options
  • Select an option

  • Save ravarcheon/606b641df4ade3642fb01bec0950c7c0 to your computer and use it in GitHub Desktop.

Select an option

Save ravarcheon/606b641df4ade3642fb01bec0950c7c0 to your computer and use it in GitHub Desktop.
the horse that blocks your screen after a 2 minutes
// ==UserScript==
// @name the horse that stands in your way
// @namespace http://tampermonkey.net/
// @version 2026-03-01
// @description no more than 2 minutes of twitter. the first minute is a clear view, the second minute is where the horse slowly fades in. third minute and beyond there is nothing to see except horse
// @author You
// @match http*://*.x.com/*
// @match http*://*.instagram.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=x.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
function map(x, a, b, c, d) {
return ((x - a) / (b - a)) * (d - c) + c;
}
const horseContainer = document.createElement("div");
horseContainer.style.cssText =
`position:fixed;` +
`top:0;` +
`left:0;` +
`width:100vw;` +
`pointer-events:none;` +
`height:100vh;`;
const horseImage = document.createElement("img");
horseImage.style.cssText =
`width:100%;` +
`opacity:0;` +
`z-index:2147483647;` +
`height:100%;`;
horseImage.src = `data:image/webp;base64,UklGRqYEAABXRUJQVlA4IJoEAACQKACdASq4ALgAPx2AtFUtJ7AxrDIL8jAjiWctlrJe3MpDfmZr5mbZEGvmFlYzPwsqtlrpWrYmxCREt0Z32pTr5VoqJsfZMWovL7fbb/1QPYV+n1yPIYVPmhFrk10Xk4hhnklTQph/tbHe3wOjNPDaRwNHjuDNCx8J4/odMB15eW8x0ikImx7GBWoRhfPnTvU1zfgB1VeuaJVh5cgH4plvC2DibTXvz56bXEvs3KLMN6vAzngG2V4ZzdMxSzhv34gy9J2XDoZidRAKOgD9Y7Tnr0d5yqdTBA8dEJuYvliFH1AVgse2IWpwszEjxreAqV+0k4H8sBeAhnf6oO4K5/Prn9kxHcq76slaOW9VsIk8E/X2fThB9C54cnDmBbenEHsATtjL+4hb2OxFrdmoJehALGTQgyz55xdrmt9quVP05/V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S9dwhnzjD76X2QqbOsPm0/YYKgn86FZP5Z049llgIrXi35Y5kJq+KfWaoa4pi7AAAAAA==`;
let horsepacity = 0;
document.body.appendChild(horseContainer);
horseContainer.appendChild(horseImage);
let horseRaf;
function horseDo() {
horsepacity = Math.min(Math.max(0, map(performance.now(), 60_000, 120_000, 0, 1)), 1); // the 60000 and 120000 are the times when the horse goes from 0 to 1 opacity, change this if you want a shorter time or a longer time or whatever
horseImage.style.opacity = horsepacity;
if (horseRaf) {
cancelAnimationFrame(horseRaf);
}
horseRaf = requestAnimationFrame(horseDo);
}
horseDo();
})();
@sogful
Copy link

sogful commented Mar 1, 2026

image would recommend

@tiagozip
Copy link

tiagozip commented Mar 1, 2026

technology is amazing

image

@HelioPolo
Copy link

imagen Yes

@MyCompany499
Copy link

mmmm... yes. horse.
Képernyőkép 2026-03-01 200618

@rushiiMachine
Copy link

Greasemonkey on Firefox does not fully support wildcards in @match rules, so I had to replace them like this:

- // @match        http*://*.x.com/*
- // @match        http*://*.instagram.com/*
+ // @match        http://*.x.com/*
+ // @match        https://*.x.com/*
+ // @match        http://*.instagram.com/*
+ // @match        https://*.instagram.com/*

@Nicopara
Copy link

Nicopara commented Mar 1, 2026

SOTY

@ianfergi
Copy link

ianfergi commented Mar 1, 2026

HORSEY

@0xatm
Copy link

0xatm commented Mar 1, 2026

Umazing! 👍

@bluestudiosanimationandgaming-lang

How to add to browser

@bluestudiosanimationandgaming-lang

How to add to browser

Nvm I'm dumb

@tails618
Copy link

tails618 commented Mar 1, 2026

Greasemonkey on Firefox does not fully support wildcards in @match rules, so I had to replace them like this:

- // @match        http*://*.x.com/*
- // @match        http*://*.instagram.com/*
+ // @match        http://*.x.com/*
+ // @match        https://*.x.com/*
+ // @match        http://*.instagram.com/*
+ // @match        https://*.instagram.com/*

thank you very much this is incredible i now have Horse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment