Git Product home page Git Product logo

fyu's Introduction

FYU

Do your users take your website for granted? Do want to make using your website living hell? Look no further, F.Y.U. is here! Oh yeah, FYU stands for something ๐Ÿ‘€.

(PS you might recognize my name from my url lengthener which went viral a few weeks back)

Getting the script

Getting the script is super easy, as it is hosted with jsDelivr (seriously that site is awesome!). All you need to do is put this at the end of the body of your site:

<script src="https://cdn.jsdelivr.net/npm/fyu/fyu.min.js"></script>

Note: You can technically put it anywhere, but this script is pretty low priority to load.

Activating the Script

Actually using the script is really easy, but you might not want to use every function, so here's a litte guide:

  • loadElems() - This loads all of the elements currently on the page. You need to run this before you run any of the functions below (with the exception of makeithell()) or else it will not work.
  • makeItHell() - You have no care for the world. Every knob at the max.
  • shiftHorizontalRandom() - Shifts each element randomly left or right 4 times per second
  • shiftVerticalRandom() - Shifts each element randomly up or down 4 times per second
  • shiftRandom() - Does both shiftHorizontalRandom() and shiftHorizontalRandom at once
  • rotateRandom() - Rotates each element randomly 4 times per second. Highly unreccomended as it can interfere with the shifting functions and just look exceptionally displeasing on it's own.
  • runAway() - Makes every element "run away" from the cursor when hovered over
  • colorsRandom() - Changes every element's color and background color every 2.5 seconds
  • opacityRandom() - Changes every element's opacity every 5 seconds

Selecting Certain Elements

Now, lets say you want some elements to stay unchanged, like if you have a div which pretty much contains the entire site. All you need to do is add the dontNuke class to those HTML elements. For example, here is a <p> which would be affected and one which wouldn't:

Affected:

<p>Hello there! uwu</p>

Not Affected:

<p class="dontNuke">Hello there! uwu</p>

Contributing

If you would like to add your own nuking functions to this script, simply make a pr with the asyncronous function added to fyu.js and the call to the said function inside of makeItHell(). Don't worry about minifying fyu.js, as I'll end up doing that myself. If the function(s) you add aren't asyncronous, I'll comment on your pr to make the change. The reason we want to do this is to not interfere with any other scripts or functions within this script.

fyu's People

Contributors

piemadd avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.