Difference between revisions of "Web defacing"
Jump to navigation
Jump to search
Line 37: | Line 37: | ||
= Resources = | = Resources = | ||
[https://github.com/mywdka/browser-extension Browser extension template] | [https://github.com/mywdka/browser-extension Browser extension template] | ||
+ | [about:debugging#/runtime/this-firefox Reload extension page (FireFox)] | ||
+ | |||
[[Category:2023]] | [[Category:2023]] |
Revision as of 07:54, 24 April 2024
Snippets
HTML
CSS
JavaScript
Grabbing an element
const titleElement = document.getElementById("my-title");
Editing the content
titleElement.innerHTML = "🙃";
Creating an element
const newListItem = document.createElement("li");
// Set the content
newListItem.innerHTML = "Add an element using JavaScript";
Insert an element
// Grab the element that we want to insert the new element into.
const list = document.getElementById("my-list");
// Append the new element
list.appendChild(newListItem);
Resources
Browser extension template [about:debugging#/runtime/this-firefox Reload extension page (FireFox)]