https://github.com/dreamingechoes/random-giphy-image
An absolute silly JS library with the only purpose of put some random Giphy images on your HTML.
https://github.com/dreamingechoes/random-giphy-image
giphy javascript
Last synced: 3 months ago
JSON representation
An absolute silly JS library with the only purpose of put some random Giphy images on your HTML.
- Host: GitHub
- URL: https://github.com/dreamingechoes/random-giphy-image
- Owner: dreamingechoes
- Created: 2015-12-13T22:06:50.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-13T22:07:19.000Z (almost 10 years ago)
- Last Synced: 2025-03-22T21:46:10.119Z (7 months ago)
- Topics: giphy, javascript
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RandomGiphyImage
## About
RandomGiphyImage is an absolute silly JS library with the only purpose of put some random Giphy images on your HTML.
## Usage
Add the `random-giphy-image.js` file in your assets. You only have to do something like this on your JS:
```javascript
$(document).ready(function(){
// Set debug mode (for console logs)
RandomGiphyImage.debug = true;// Testing api key by default if you don't specify one
RandomGiphyImage.data.api_key = 'YOUR_GIPHY_API_KEY';// Class of the HTML element where you want to put the gif
RandomGiphyImage.data.element_class = 'giphyme';// Query or tag of your random gif
RandomGiphyImage.data.query = 'nintendo';// Executes the random gif thing
RandomGiphyImage.giphyme();
});
```
And then put one or more HTML elements in your view:```html
```
Refresh you page and... voila! :)
**Important: this library uses jQuery to work.**
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/dreamingechoes/random_giphy_image_rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
## License
**RandomGiphyImage** is released under the terms of the [MIT License](http://opensource.org/licenses/MIT).