README
RickRoll.js
Some javascript module that used for rickrolling people in website.
Install
You can get RickRoll.js at npm
npm install rickroll.js
Add this script to your page
<script src="node_modules/rickroll.js/RickRoll.js"></script>
<script>
rickroll();
</script>
Or this:
<script src="https://yonle.github.io/RickRoll.js/RickRoll.js"></script>
<script>
rickroll();
</script>
Method
There's alot of method in RickRoll.js to RickRoll people in your website:
rickroll()
A main function of RickRoll.jsParameters (Optional)
These Parameter that you must provide is in type of
boolean
.click
for Triggering any Click Event indocument
.scroll
for Triggering any scroll Event indocument
.mousemove
for Triggering any mouse movement Event indocument
.mouseenter
for Triggering some mouse when entered todocument
(Unstable).mouseleave
for Triggering mouse when mouse leavesdocument
.mousewheel
for Triggering any mouse wheel event indocument
.drag
for Triggering any drag event indocument
(Unstable).input
for Triggering anyinput
andkey
event indocument
.resize
for Triggering anyresize
event indocument
(Notice: This option may not stable for mobile browser user.).
rickroll.showup()
A function that clean the webpage and Play the rickroll.Parameters (Optional)
Those parameter is optional. Default will goes to
rickroll.showup.loop
and other.force
(boolean) A parameter that used to forceshowup()
function rickrolls evenrickroll.playing
istrue
.src
(string) A parameter that used to Plays a Video from URL Destination.loop
(boolean) A parameter that used to loop a video.
Example:
button.onclick = function () { rickroll.showup(); });
To force rickroll video even
rickroll.playing
istrue
.:rickroll.showup({ force: true });
rickroll.video
A variable that contains RickRoll Video(raw) URL. You can also change it.rickroll.showup.only_once
A variable that used to makerickroll.showup()
function to run only once. Default istrue
.rickroll.showup.loop
A variable that used for looping a video.rickroll.playing
A variable that used to know if the player is loaded & played a video right now. Returnsfalse
if it's not playing.
Community
Any question or doubt can contact us at our discord server.