„MediaWiki:Common.js” változatai közötti eltérés
Jump to navigation
(Eltávolította a lap teljes tartalmát) Címkék: Oldal egésze eltávolítva Kézi visszaállítás |
Nincs szerkesztési összefoglaló |
||
1. sor: | 1. sor: | ||
document.body.onload = addElement; | |||
function addElement() { | |||
// create a new div element | |||
const newDiv = document.createElement("div"); | |||
// and give it some content | |||
const newContent = document.createTextNode('<img alt="FacebookLogo.png" src="/images/thumb/9/9d/FacebookLogo.png/80px-FacebookLogo.png" decoding="async" width="80" height="80" srcset="/images/thumb/9/9d/FacebookLogo.png/120px-FacebookLogo.png 1.5x, /images/thumb/9/9d/FacebookLogo.png/160px-FacebookLogo.png 2x">'); | |||
// add the text node to the newly created div | |||
newDiv.appendChild(newContent); | |||
// add the newly created element and its content into the DOM | |||
const currentDiv = document.getElementById("mirage-sitename"); | |||
document.body.insertBefore(newDiv, currentDiv); | |||
} |
A lap 2023. augusztus 16., 07:05-kori változata
document.body.onload = addElement; function addElement() { // create a new div element const newDiv = document.createElement("div"); // and give it some content const newContent = document.createTextNode('<img alt="FacebookLogo.png" src="/images/thumb/9/9d/FacebookLogo.png/80px-FacebookLogo.png" decoding="async" width="80" height="80" srcset="/images/thumb/9/9d/FacebookLogo.png/120px-FacebookLogo.png 1.5x, /images/thumb/9/9d/FacebookLogo.png/160px-FacebookLogo.png 2x">'); // add the text node to the newly created div newDiv.appendChild(newContent); // add the newly created element and its content into the DOM const currentDiv = document.getElementById("mirage-sitename"); document.body.insertBefore(newDiv, currentDiv); }