Skip to content

Commit

Permalink
Merge pull request #2 from placeDE/Fix-expansion
Browse files Browse the repository at this point in the history
Update placeDE-overlay.user.js
  • Loading branch information
Zod- authored Apr 3, 2022
2 parents dd8df2b + 0149e77 commit 4ab0bae
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/scripts/placeDE-overlay.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,15 @@
// @updateURL https://github.com/placeDE/place-overlay/raw/main/src/scripts/placeDE-overlay.user.js
// @downloadURL https://github.com/placeDE/place-overlay/raw/main/src/scripts/placeDE-overlay.user.js
// ==/UserScript==
const url = "https://raw.githubusercontent.com/placeDE/pixel/main/overlay.png"
let url = "https://raw.githubusercontent.com/placeDE/pixel/main/overlay.png"
//url = "https://i.imgur.com/0fRq2nu.png"
if (window.top !== window.self) {
window.addEventListener('load', () => {
document.getElementsByTagName("mona-lisa-embed")[0].shadowRoot.children[0].getElementsByTagName("mona-lisa-canvas")[0].shadowRoot.children[0].appendChild(
(function () {
const i = document.createElement("img");
i.src = url;
i.onload = () => {
if (i.width === i.height) {
i.style = "position: absolute;left: 0;top: 0;image-rendering: pixelated;width: 1000px;height: 1000px;";
} else {
i.style = "position: absolute;left: 0;top: 0;image-rendering: pixelated;width: 2000px;height: 1000px;";
}
};
i.style = "position: absolute;left: 0;top: 0;image-rendering: pixelated;width: 2000px;height: 2000px;";
return i;
})())
}, false);
Expand Down

0 comments on commit 4ab0bae

Please sign in to comment.