https://github.com/kelvinbiffi/mariotextgeneratorjsplugin
JavaScript Plugin To Generate Super Mario Text Phrases
https://github.com/kelvinbiffi/mariotextgeneratorjsplugin
hacktoberfest javascript-plugin mario
Last synced: about 1 year ago
JSON representation
JavaScript Plugin To Generate Super Mario Text Phrases
- Host: GitHub
- URL: https://github.com/kelvinbiffi/mariotextgeneratorjsplugin
- Owner: kelvinbiffi
- Created: 2019-02-13T15:35:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-28T04:26:08.000Z (over 4 years ago)
- Last Synced: 2025-01-26T18:46:44.071Z (over 1 year ago)
- Topics: hacktoberfest, javascript-plugin, mario
- Homepage: https://kelvinbiffi.github.io/MarioTextGeneratorJSPlugin/
- Size: 73.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mario Text Generator JS Plugin
MarioTextGeneratorJSPlugin is a JavaScript plugin for generate text paragraths and sentences with Mario World words.
## Installation
[CDNScript](https://cdn.jsdelivr.net/gh/kelvinbiffi/MarioTextGeneratorJSPlugin@master/dist/MarioIpsum.js)
or
Clone the repository and download de Script
## Usage
This first snippet is aleady executed by the MIpsum Plugin
```javascript
var mis = [].slice.call(document.querySelectorAll('[data-mario]'));
mis.forEach(function (mie) {
var marioIpsum = new MIpsum;
marioIpsum.element = mie;
marioIpsum.createText();
});
```
Parameters values:
* TYPE: PARAGRAPH or SENTENCE
* LENGTH: LENGTH OF THE PARAGRAPH or SENTENSE YOU WANT
* MODE: SHORT, MEDIUM or LONG (MODE is optional to deffine whether text would be shortest or longest, default value is set as MEDIUM)
The pattern is TYPE LENGTH MODE, see the below example to know more or access the link [Text Generator](https://kelvinbiffi.github.io/MarioTextGeneratorJSPlugin/)
To use for specifics element using javascript, follow the below pattern
```javascript
// Interval to wait Plugin exists
var waitMIpsum = setInterval(function () {
if (MIpsum) {
clearInterval(waitMIpsum);
// Usege to specific element
var marioIpsum = new MIpsum;
marioIpsum.element = document.querySelector('selector of element');
marioIpsum.createText('PARAGRAPH', 3, 'MEDIUM');
}
}, 100);
```
To use for specifics element using html only, follow the below pattern
```html
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.