Sandbox: Difference between revisions
From Hidden Mickey Wiki
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<htmltag tagname="script" type="text/javascript"> | <htmltag tagname="script" type="text/javascript"> | ||
document.addEventListener('DOMContentLoaded', function() { | document.addEventListener('DOMContentLoaded', function() { | ||
// Find the main content container | |||
var content = document.getElementById('mw-content-text'); | |||
if (!content) { | |||
console.warn('Main content container not found!'); | |||
return; | |||
} | |||
// Create the red text paragraph | |||
var p = document.createElement('p'); | var p = document.createElement('p'); | ||
p.style.color = 'red'; | p.style.color = 'red'; | ||
p.style.fontWeight = 'bold'; | p.style.fontWeight = 'bold'; | ||
p.style.fontSize = '16px'; | p.style.fontSize = '16px'; | ||
p.innerText = 'Hello World from JS!'; | p.innerText = 'Hello World from JS inside Medik skin!'; | ||
// Append it inside the main content | |||
content.appendChild(p); | |||
}); | }); | ||
</htmltag> | </htmltag> | ||
Revision as of 10:22, 1 October 2025