browser-milje/scripts/milje.js

34 lines
89 KiB
JavaScript
Raw Permalink Normal View History

const manifestData = chrome.runtime.getManifest();
const version = manifestData.version;
console.log("browser-milje version " + version);
2024-09-11 19:17:24 +00:00
const milje = document.createElement('div');
const style = {
position : 'fixed',
top : 0,
left : 0,
width : '100%',
display : 'flex',
pointerEvents : 'none',
zIndex : '99999',
minHeight : '500px',
backgroundImage : 'url(https://raw.githubusercontent.com/miljegen/browser-milje/main/assets/milje.png)',
backgroundSize : 'contain',
backgroundRepeat : 'no-repeat',
backgroundPosition : 'center',
transform : 'translateY(-50%)',
}
Object.assign(milje.style, style);
//milje.style.backgroundImage='url(https://www.github.com/miljegen/browser-milje/blob/main/assets/milje.png)';
//milje.style.backgroundImage = `url(${browser.runtime.getURL('./assets/browser-milje.png'})`;
//milje.style.backgroundImage=`url(${chrome.runtime.getURL("../assets/milje.png")}`
//milje.style.backgroundImage=`url("../assets/browser-milje.png")`;
//backgroundImage = 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANcAAADrCAYAAAD6xQNjAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAACAASURBVHhe7L0FWJbp9j28UQERRLG7u9uxuxMbLERSRVFRFFQEJAxEDEywu7u7u7u7BQsF0fe/1uZ4vvOda878PGfGmXHm5bq8EHjjee9n73vvvfba6zYR45dxBYwr8F1WwOS7vKrxRY0rYFwBMTqX0QiMK/CdVsDoXN9pYY0va1wBo3MZbcC4At9pBYzO9Z0W1viyxhUwOpfRBowr8J1WwOhc32lhjS9rXAGjc/1gNlC6ZI4hZ88/CP3BLvtveblG5/pBbvsAD3tDkSKFJVvWzPLkySM5ceKETIveZLx/f+L7Z7w5f+Kb8/XS3B1bGZo3ayL37t2RjOnTSMKneDEzM5Pnz16J+8BxJk1rVzAULFhQypavIGvWrJE1W/Yb7+uf4L4ab8Kf4Cb8X5ewcuF4g1mKZPLi+RPJmM5GXrzE94wZEcGeSU/PCSYr5403fPyYIKbmKcXS0lJexsRKN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Df7ujzM613eygF5OLQ0O3e3kE7iBXxIT5Myp0zJyxEwZN9pTqlapItMjp8vNu3ekccvmkjVHdunt5i2TpwQob5CQekozc/SibiFNTKm10uWLlxClqklqq7SouR5IBpt0YpIiOfQ0PuDRn7TOolMSfg8KCgIz4z1SzykY+X+tQEj+/AUlDk4ycdJUPNYUjen2cvzocalQqrT4+/uJ95CBkiN3FuncxVOCQtzk/OWzYtvWFrXaMyCKmSRnjnxw
document.body.appendChild(milje);
const message = { extensionDetected: true };
2024-09-11 19:17:24 +00:00
window.postMessage(message, "*");