browser-milje/scripts/milje.js

23 lines
89 KiB
JavaScript
Raw Normal View History

2024-08-14 08:06:06 +00:00
console.log("browser-milje version 0.0.1")
let div = document.createElement('div');
div.classList.add('milje');
// let text = document.createTextNode('Test');
// div.appendChild(text);
div.style.position = 'fixed'
div.style.top = '0'
div.style.left = '0'
div.style.width = '100%'
div.style.display = 'flex'
2024-08-14 08:06:06 +00:00
div.style.justifyContent = 'center' // how do i center a div???
div.style.alignItems = 'center'
div.style.pointerEvents = 'none'
2024-08-14 08:06:06 +00:00
div.style.zIndex = '99999' // the magic number(extremely hacky, there has to be a better way)
div.style.height = '1200px'
div.style.backgroundImage = 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANcAAADrCAYAAAD6xQNjAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAACAASURBVHhe7L0FWJbp9j28UQERRLG7u9uxuxMbLERSRVFRFFQEJAxEDEywu7u7u7u7BQsF0fe/1uZ4vvOda878PGfGmXHm5bq8EHjjee9n73vvvfba6zYR45dxBYwr8F1WwOS7vKrxRY0rYFwBMTqX0QiMK/CdVsDoXN9pYY0va1wBo3MZbcC4At9pBYzO9Z0W1viyxhUwOpfRBowr8J1WwOhc32lhjS9rXAGjc/1gNlC6ZI4hZ88/CP3BLvtveblG5/pBbvsAD3tDkSKFJVvWzPLkySM5ceKETIveZLx/f+L7Z7w5f+Kb8/XS3B1bGZo3ayL37t2RjOnTSMKneDEzM5Pnz16J+8BxJk1rVzAULFhQypavIGvWrJE1W/Yb7+uf4L4ab8Kf4Cb8X5ewcuF4g1mKZPLi+RPJmM5GXrzE94wZEcGeSU/PCSYr5403fPyYIKbmKcXS0lJexsRKN+dBxnv7fy3sd/678QZ85wX+tS/fs1NdQxvbFvIx7q2kS28tL188l2TJRNLZpJE9e/dLpcrV5cChY1K50k/y2SDyMeGLmCRLIW/fvhMXDz/j/f21N+BXPN+4+L9i8b7XU0vkzJS/boPqN6ytU8JJYqRQgbySIrlBTFOYyIeP78XCz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Dk4ycdJUPNYUjen2cvzocalQqrT4+/uJ95CBkiN3FuncxVOCQtzk/OWzYtvWFrXaMyCK
2024-08-14 08:06:06 +00:00
// `url(${chrome.runtime.getURL("assets/milje.png")}` this didn't seem to work for some reason, yet the awful base64 thing does
div.style.backgroundSize = 'contain'
div.style.backgroundRepeat = 'no-repeat'
div.style.backgroundPosition = 'center'
div.style.transform = 'translateY(-50%)'
document.body.appendChild(div)