/piss-off-text

Make a prank to your designer friend

Primary LanguageHTML

Piss-off-Text

Make a prank to your designer friend.

What is this?

This is the script that plays witht text kerning and brings the headache to the reader.

Ok google, let's make it!

  1. Add the piss-off-text.js (or the minified one) to the page.
  2. Run pissOffText(); and enjoy.
  3. Extra params can be passed into the function as the object, for instance, pissOffText({text: 'article > p'});. Params are:
  • text — means the CSS selector for elements containing text to modify.
    This allows to patch the particular part of the page, not the entire one.
    Defaults to "p".
  • level — one of "letters" (default) or "words". Means how deep the distortion will work.
  • distortion — is the object that contains one or both of "v" and "h"properties. It describes the distortion amplitude: 0 leaves the chunks untouched, 100 does the Harlem shake.
    Defauls to {v: 0, h: 10}.

Inspered by

How to piss off your designer friends

Credits

Roman Melnyk email.rom.melnyk@gmail.com