Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Latest commit

 

History

History
34 lines (24 loc) · 721 Bytes

README.md

File metadata and controls

34 lines (24 loc) · 721 Bytes

Meme.js

Use one function to generate a meme.

You can call it all with strings:

Meme('dog.jpg', 'canvasID', 'Buy pizza', 'Pay in snakes');

Or with a selected canvas element:

var canvas = document.getElementById('canvasID');
Meme('wolf.jpg', canvas, 'The time is now', 'to take what\'s yours');

Or with a jQuery/Zepto selection:

Meme('spidey.jpg', $('#canvasID'), 'Did someone say', 'Spiderman JS?');

You can also pass in an image:

var img = new Image();
img.src = 'insanity.jpg';
var can = document.getElementById('canvasID');
Meme(img, can, 'you ignore my calls', 'I ignore your screams of mercy');

License info is in LICENSE.txt.