SL+ Addon

Add some useful features to SL+

// ==UserScript==
// @name         SL+ Addon
// @description  Add some useful features to SL+
// @version      0.1
// @author       Pixelmelt
// @license      MIT
// @namespace    https://greasyfork.org/en/users/226344
// @match        https://starblast.dankdmitron.dev/
// @icon         https://avatars.githubusercontent.com/u/44953835?v=4
// @grant        none
// @liscense     MIT
// ==/UserScript==

// create a div that holds an iframe to google.com that is off to the side, almost offscreen
var div = document.createElement("div");
div.style.position = "fixed";

//put the div in the middle of the screen
div.style.top = "0";
div.style.left = "0";

div.style.width = "100%";
div.style.height = "100%";

div.style.zIndex = "9999";

//allow clicking through the div
div.style.pointerEvents = "none";

//add some space around the div
div.style.marginTop = "1%";
div.style.marginBottom = "1%";

//set the iframe's src
var iframe = document.createElement("iframe");
iframe.src = "https://search.pixelmelt.dev/";

//set the iframe's width and height to 90% of the screen width and height
iframe.style.width = "50%";
iframe.style.height = "95%";
iframe.style.border = "none";
iframe.style.position = "fixed";

iframe.style.pointerEvents = "auto";

iframe.style.left = "-49%";

//on hover slide the iframe in from the side
iframe.addEventListener("mouseover", function() {
  iframe.style.transition = "left 0.5s ease-in-out";
  iframe.style.left = "0";
});

// when the mouse leaves the div, slide it back to the side
iframe.addEventListener("mouseout", function() {
  iframe.style.transition = "left 0.5s ease-in-out";
  iframe.style.left = "-49%";
});


//round the corners of the iframe
iframe.style.borderRadius = "10px";


// append the iframe to the div
div.appendChild(iframe);

document.body.appendChild(div);