Skip to content

Instantly share code, notes, and snippets.

@SimDing
Last active February 26, 2024 07:38
Show Gist options
  • Save SimDing/c3b9f08dcb073b0494bc to your computer and use it in GitHub Desktop.
Save SimDing/c3b9f08dcb073b0494bc to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name BetterPrank
// @namespace dngsimon
// @include http://fediafedia.com/prank/win7/*
// @version 1
// @grant none
// ==/UserScript==
// trash original shit
clearInterval(counter);
//Set own
var interval = setInterval(myTimer, 1000);
//max percentage
var maximum = 100;
var reachMax = false;
//The higher the mighty
var slowness = 400;
//Time in seconds, set higher to start midways
var count = 0;
//Adds some kind of 'random' dropping for extra trolling of the super dau
var randSin = true;
//The precentage goes up and down and up and down... like the sea... hypnotizingly dumb
var sineCurve = false;
var percent;
function myTimer() {
count++;
percent = maximum - maximum / (Math.exp(count / slowness));
if(randSin){
percent -= Math.abs(Math.sin(count * 7)) + Math.abs(Math.sin(count * 11)) + Math.abs(Math.sin(count * 13));
percent = Math.max(percent, 0);
}
if(sineCurve){
var half = maximum / 2;
percent = half + half * -Math.cos(count / slowness);
}
if(reachMax){
percent = Math.ceil(percent);
}else{
percent = Math.floor(percent);
}
document.getElementById("timer").innerHTML= percent + '%';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment