MediaWiki:Common.js

function inject { var wrapper = document.createElement("div"); wrapper.innerHTML = "                 <path d='M299.4,504.7a33,33,0,0,1-.4,4.9c-3.7,24.9-35.1,44.4-73.4,44.4s-69.8-19.5-73.4-44.5a32.7,32.7,0,0,1-.3-4.8h0a2.4,2.4,0,0,1,4.5-1.2c10.3,18.9,37.4,32.4,69.3,32.4s58.9-13.5,69.3-32.4a2.4,2.4,0,0,1,4.5,1.2h0Z' fill='#af571d'> <path d='M165.7,533.3c39.9,27.3,80.5,27.7,120,0' fill='none' stroke='#3f1c0d' stroke-linecap='round' stroke-miterlimit='10' stroke-width='10'> </g> <g id='head' class='head' style='transform: translate(-0.5px, -2.66667px);'> <g id='ears' class='ears' style='transform: translate(1.07143px, 3.92857px);'> <g> <circle cx='92.2' cy='53.9' r='48.9' fill='#e07320' stroke='#3f1c0d' stroke-miterlimit='10' stroke-width='10'> <circle cx='93.1' cy='53.9' r='31.9' fill='#ee9e5c'> </g> <g> <circle cx='351.6' cy='53.9' r='48.9' fill='#e07320' stroke='#3f1c0d' stroke-miterlimit='10' stroke-width='10'> <circle cx='352.5' cy='53.9' r='31.9' fill='#ee9e5c'> </g> </g> <path d='M409.6,176.9c0,94.7-83.5,130.1-186.4,130.1S36.8,271.6,36.8,176.9,120.3,5.4,223.2,5.4,409.6,82.2,409.6,176.9Z' fill='#e07320'> <path id='head-stroke' d='M409.6,176.9c0,94.7-83.5,130.1-186.4,130.1S36.8,271.6,36.8,176.9,120.3,5.4,223.2,5.4,409.6,82.2,409.6,176.9Z' fill='none' stroke='#3f1c0d' stroke-miterlimit='10' stroke-width='10'> <g id='eyes' class='eyes' style='transform: translate(-1.11111px, -7.77778px);'> <circle cx='291.1' cy='138' r='16.8' fill='#3f1c0c'> <circle cx='287.3' cy='134.2' r='4.8' fill='#884d3a'> <circle cx='155.3' cy='138' r='16.8' fill='#3f1c0c'> <circle cx='152.3' cy='134.2' r='4.8' fill='#884d3a'> <path d='M117.1,106.7l0.5-2.2,0.3-1.1,0.6-1.5a23.6,23.6,0,0,1,1.6-3.5l1.1-1.9,1.3-1.9,0.7-1,0.8-.9,1.7-1.9a33.4,33.4,0,0,1,14.1-8.3,36.2,36.2,0,0,1,5.3-1.1l2.6-.2h4.8l2.1,0.4,1.9,0.4,1.7,0.5,1.5,0.5,1.2,0.5,2.2,1.1a3.2,3.2,0,0,1-1.7,6h-0.4l-2-.2h-6.9l-1.7.2h-0.9l-0.9.2-1.9.3c-1.3.4-2.6,0.6-3.8,1.1a40.3,40.3,0,0,0-3.8,1.5,39.5,39.5,0,0,0-6.9,4.3l-1.4,1.3-0.7.6-0.6.7-1.2,1.3-1,1.3-1,1.2-0.8,1.1-0.7.9-0.6,1-1.2,1.9A3.2,3.2,0,0,1,117.1,106.7Z' fill='#3f1c0d'> <path d='M323.4,109.2l-1.2-1.9-0.6-1-0.7-.9-0.8-1.1-1-1.2-1-1.3-1.2-1.3-0.6-.7-0.7-.6-1.4-1.3a31.6,31.6,0,0,0-10.7-5.8c-1.3-.5-2.6-0.7-3.8-1.1l-1.9-.3-0.9-.2h-0.9l-1.7-.2h-6.9l-2,.2h-0.4a3.2,3.2,0,0,1-1.7-6l2.2-1.1,1.2-.5,1.5-.5,1.7-.5,1.9-.4,2.1-.4h4.8l2.6,0.2a36.2,36.2,0,0,1,5.3,1.1,35.1,35.1,0,0,1,14.1,8.3l1.7,1.9,0.8,0.9,0.7,1,1.3,1.9,1.1,1.9a23.6,23.6,0,0,1,1.6,3.5l0.6,1.5,0.3,1.1,0.5,2.2A3.2,3.2,0,0,1,323.4,109.2Z' fill='#3f1c0d'> </g> <g> <path class='snout' d='M308.5,230c0,43.6-40.2,52.6-87.3,52.6s-83.3-9-83.3-52.6,38.2-79,85.3-79S308.5,186.3,308.5,230Z' fill='#ee9e5c' style='transform: translate(-1.33333px, -10.5882px);'> <g class='nose' style='transform: translate(-2px, -18px);'> <path d='M197.6,187.5c0-11.1,11.5-11.7,25.6-11.7s25.6,0.7,25.6,11.7-11.5,20-25.6,20S197.6,198.6,197.6,187.5Z' fill='#3f1c0c'> <path d='M227.5,201a13.9,13.9,0,0,1,.2,1.7v4.6a109.6,109.6,0,0,1-.4,14.3c-0.1,1.3-.3,2.6-0.5,3.9s-0.4,2.6-.7,3.8a34.2,34.2,0,0,1-.9,3.5,32.6,32.6,0,0,1-1.2,3,23.6,23.6,0,0,1-1.3,2.4l-1.2,1.8-1.2,1.4a2,2,0,0,1-3.5-1.6v-0.2s0.1-.6.3-1.7,0.2-1.1.3-1.8,0.3-1.5.4-2.4,0.1-.9.2-1.3,0.2-.9.2-1.4,0.3-2,.4-3.1,0.3-2.2.3-3.3,0.1-2.3.1-3.5a101.1,101.1,0,0,0-1-13.1q-0.4-2.7-.6-4.3a13.9,13.9,0,0,1-.2-1.7A5,5,0,0,1,227.5,201Z' fill='#3f1c0d'> <path d='M233.7,244.2l-1.4.2-3.8.3H223l-3.1-.3-3.2-.4a46.8,46.8,0,0,1-6.2-1.4,53.2,53.2,0,0,1-5.3-1.9l-2-1-1.5-1-1.2-1a2.1,2.1,0,0,1,1.3-3.6h3.2l2,0.2,2.4,0.4,2.6,0.4L218,236l5.8,0.9,5.1,1,3.6,0.9,1.4,0.4A2.6,2.6,0,0,1,233.7,244.2Z' fill='#3f1c0d'> <ellipse cx='223.4' cy='183.3' rx='11.7' ry='3.5' fill='#884d3a'> </g> </g> </g> </g> "; document.body.appendChild(wrapper); var toggle = document.createElement("li"); toggle.id = "pt-honey-toggle"; toggle.innerHTML = "<label class='switch'> <input type='checkbox' onclick='onHoney' id='honey-toggle'> "; document.getElementsByClassName("vector-menu-content-list")[0].appendChild(toggle);

}

function onHoney{ var checkBox = document.getElementById("honey-toggle"); if (checkBox.checked == true){ document.documentElement.style.cursor = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='40px' height='40px' viewBox='0 0 122.1 129.3'%3E %3Cg%3E %3Cpath id='bottom' d='M118.6,74.8c0,20.4-12.7,38.1-31.2,46.9a12.4,12.4,0,0,1-5.3,1.2H40a11.9,11.9,0,0,1-5.1-1.1c-18-8.5-30.6-25.4-31.4-45-0.6-15.2,7.1-28,16.5-39a33.5,33.5,0,0,0,6.2-12.1H95.9A33.4,33.4,0,0,0,102,37.7C111,48.2,118.6,60.3,118.6,74.8Z' fill='%23af571d'/%3E %3Cpath id='top' d='M118.6,74.8a48.8,48.8,0,0,1-5,21.6H8.6A48.3,48.3,0,0,1,3.5,76.7c-0.6-15.2,7.1-28,16.5-39a33.5,33.5,0,0,0,6.2-12.1H95.9A33.4,33.4,0,0,0,102,37.7C111,48.2,118.6,60.3,118.6,74.8Z' fill='%23e07320'/%3E %3Cpath id='shadow' d='M117.1,73.9c0,17.3-9.1,32.7-23.3,42.3a33.9,33.9,0,0,1-19.1,5.7H44.7a34.5,34.5,0,0,1-19.4-5.8,57.6,57.6,0,0,1-5.4-4.2c-0.9-.8.3-2.1,1.3-1.4h0.1c5.4,3.7,12,4,18.8,4H70.5c10.2-.4,16.8-2.4,21.6-6.1,14.3-10.9,20.7-23,20.7-40.3A42.2,42.2,0,0,0,111,56c-0.3-1.1,1.4-1.7,1.9-.6A44.2,44.2,0,0,1,117.1,73.9Z' fill='%23873f16'/%3E %3Cpath id='pot-stroke' d='M118.6,74.8c0,17.3-9.1,32.7-23.3,42.3a33.9,33.9,0,0,1-19.1,5.7H45.9a33.7,33.7,0,0,1-18.8-5.5C13.4,108,4.2,93.3,3.5,76.7s7.1-28,16.5-39a33.5,33.5,0,0,0,6.2-12.1H95.9A33.4,33.4,0,0,0,102,37.7C111,48.2,118.6,60.3,118.6,74.8Z' fill='none' stroke='%233f1c0d' stroke-miterlimit='10' stroke-width='7'/%3E %3Crect x='4.9' y='9.3' width='112.2' height='23.26' rx='6.7' ry='6.7' fill='%23af571d' stroke='%233f1c0d' stroke-miterlimit='10' stroke-width='7'/%3E %3C/g%3E %3Cg id='honey'%3E %3Cpath d='M105.5,28.3h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.2,0-7.7-3-8-6.8V59a8.1,8.1,0,0,0,6.9,3.7h3.1c4.4,0,8-3.3,8-7.4V40.1c0-3.6,3.2-6.5,7.1-6.5h1C80.1,33.6,83.3,36.5,83.3,40.1Z' fill='%23ed991d'/%3E %3Cpath d='M103.5,23.4V71.6c0,4-3.6,7.3-8,7.3H92.3c-4.4,0-8-3.3-8-7.3V70.2a8.1,8.1,0,0,0,6.9,3.7h3.1c4.4,0,8-3.3,8-7.3V18.4a5.4,5.4,0,0,0-.1-1h0.1V2.9a5.8,5.8,0,0,1,1,3.3V23.4Z' fill='%23ed991d'/%3E %3Cpath d='M103.5,28.6v1a5.6,5.6,0,0,0-.1-0.9h0.1Z' fill='%23f8ca13'/%3E %3Crect x='23.9' y='4' width='38.8' height='7.21' rx='3.6' ry='3.6' fill='%23f9f4d6' opacity='0.71'/%3E %3C/g%3E %3C/svg%3E\"), auto"; } else { document.documentElement.style.cursor = "default"; } }

function onDrag { const widget = document.getElementById("widget"); if (widget == null) return; widget.onmousedown = function (e) { var ev = e || window.event; e.preventDefault; var distanceX = widget.offsetLeft + widget.offsetWidth - ev.clientX; var distanceY = widget.offsetTop + widget.offsetHeight - ev.clientY; document.onmousemove = function (e) { var ev = e || window.event; e.preventDefault; right = window.innerWidth - (ev.clientX + distanceX); bottom = window.innerHeight - (ev.clientY + distanceY); if (right >= -5 && right <= window.innerWidth - widget.offsetWidth + 5) widget.style.right = right + 'px'; if (bottom >= -5 && bottom <= window.innerHeight - widget.offsetHeight + 5) widget.style.bottom = bottom + 'px'; }       document.onmouseup = function  { document.onmousemove = null; document.onmouseup = null; };   }; } inject; onDrag; mw.loader.load('/w/index.php?title=MediaWiki:Bundle.js&action=raw&ctype=text/javascript');