]>
jfr.im git - irc/unrealircd/unrealircd-webpanel-plugins.git/blob - emoji_trail/emoji_trail.php
5 @description This plugin makes an emoji trail from your mouse cursor.
6 @contact valerie@valware.co.uk
12 @screenshot https://github.com/unrealircd/unrealircd-webpanel-plugins/blob/main/emoji_trail/screenshots/emoji-trail.png?raw=true
13 @icon https://i.guim.co.uk/img/media/a1b7129c950433c9919f5670c92ef83aa1c682d9/55_344_1971_1183/master/1971.jpg?width=1200&height=900&quality=85&auto=format&fit=crop&s=88ba2531f114b9b58b9cb2d8e723abe1
18 /* You must specify these here for internal use
19 * All of these are mandatory or your plugin will not work.
21 public $name = "emoji_trail"; // Name of your plugin
22 public $author = "Valware"; // Name or handle of your lovely self
23 public $version = "1.1"; // Version of this plugin
24 public $description = "Adds emoji_trail stuff"; // Description of your beautiful plugin
25 public $email = "v.a.pond@outlook.com"; // An email people can contact you with in case of problems
27 /** This is run on plugin load. You can add hooks and initialize whatever databases
28 * that you think you might need.
30 function __construct()
33 Hook
::func(HOOKTYPE_HEADER
, 'emoji_trail::do_emoji_trail_shit');
36 public static function do_emoji_trail_shit(&$pages)
43 animation
: animate
1s linear infinite
;
73 let images
= ["๐", "๐", "๐", "๐", "๐", "๐
", "๐", "๐คฃ", "๐ฅฒ", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐ฅฐ", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐", "๐คช", "๐คจ", "๐ง", "๐ค", "๐", "๐ฅธ", "๐คฉ", "๐ฅณ", "๐", "๐", "๐", "๐", "๐", "๐", "๐"];
75 document
.addEventListener('mousemove', function(e
) {
76 let body
= document
.querySelector("body");
77 let emoji
= document
.createElement("span");
78 emoji
.classList
.add("emoji");
83 emoji
.style
.left
= x +
"px";
84 emoji
.style
.top
= y +
"px";
86 let icon
= images
[Math
.floor(Math
.random() * images
.length
)];
87 emoji
.innerText
= icon
;
89 let size
= Math
.random() * 50;
90 emoji
.style
.fontSize
= 5 + size +
"px";
94 let randomValue
= Math
.floor((Math
.random() * ((max +
1) - min
)) + min
);
96 emoji
.style
.transform
= 'translateX(' + randomValue +
'px)';
98 body
.appendChild(emoji
);
100 setTimeout(function(){