„MediaWiki:Common.js” változatai közötti eltérés
Jump to navigation
Nincs szerkesztési összefoglaló |
Nincs szerkesztési összefoglaló |
||
1. sor: | 1. sor: | ||
document. | // 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:06-kori változata
// 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);