-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathorig.js
30 lines (28 loc) · 1.11 KB
/
orig.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// ==UserScript==
// @name r/MexicoPlace template
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the canvas!
// @author r/MexicoPlace Discord Server community
// @match https://garlic-bread.reddit.com/embed*
// @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com
// @grant none
// ==/UserScript==
console.log('SCRIPT r/MexicoPlace template');
function setImageElement() {
let container =
document.querySelector('garlic-bread-embed').shadowRoot.children[0]
.querySelector('garlic-bread-canvas').shadowRoot.children[0];
container.appendChild((function () {
const i = document.createElement("img");
i.src = "https://raw.githubusercontent.com/rPlaceMexico/mexico-place-2023/master/MexicoFTW_template.png";
i.style = "position:absolute;left:0;top:0;image-rendering:pixelated;width:1500px;height:1000px;";
console.log(i);
return i;
})());
}
if (window.top !== window.self) {
window.addEventListener('load', () => {
setTimeout(setImageElement, 5000);
}, false);
}