User:SaoMikoto/common.js
From Test Wiki
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/** InPageEdit Preferences */
(window.InPageEdit = window.InPageEdit || {}).myPreference = {
"doNotCollectMyInfo": false,
"editMinor": false,
"editSummary": "$section // Edit via InPageEdit",
"lockToolBox": true,
"redLinkQuickEdit": false,
"outSideClose": true,
"watchList": "preferences",
"noConfirmEdit": true,
"plugins": [
"toolbox.js",
"wiki-editor.js",
"quick-thank.js",
"color-preview.js",
"code-mirror/cm6.js",
"edit-any-page.js",
"fix-double-entrance.js"
]
}
mw.loader.load('https://cdn.jsdelivr.net/npm/mediawiki-inpageedit');
importScript('User:SaoMikoto/js/Usergroup.js'); // Backlink: [[User:SaoMikoto/js/Usergroup.js]]
importScript('User:SaoMikoto/js/CleanDeleteReasons.js'); // Backlink: [[User:SaoMikoto/js/CleanDeleteReasons.js]]
$(document).ready(function() {
var elements = ['🍀', '☘️', '🌸', '🌿'];
function createFallingElement() {
var element = $('<div class="falling-element">')
.text(elements[Math.floor(Math.random() * elements.length)])
.css({
'left': Math.random() * 100 + '%',
'animation-duration': (Math.random() * 3 + 2) + 's',
'animation-delay': Math.random() * 2 + 's'
});
$('body').append(element);
setTimeout(function() {
element.remove();
}, 8000);
}
setInterval(createFallingElement, 800);
});