You can use these on the inspector's console, or save them as bookmarks by turning them into a oneliner and writing javascript:
before the code.
- Clear out website content in order to save RAM:
document.body.innerHTML = "";
document.head.innerHTML = "";
- Dark mode (not efficient at the moment, sometimes breaks websites):
function dark_mode(x) {
elements = document.getElementsByTagName(x);
for (var i = 0; i < elements.length; i++) {
elements[i].style.backgroundColor = "black";
elements[i].style.color = "red";
}
}
dark_mode("div");
- When filling out long forms, and they don't save automatically:
const form = document.getElementById("sampleForm"); // write form id here
let reqBody = {};
Object.keys(form.elements).forEach(key => {
let element = form.elements[key];
if (element.type !== "submit") {
reqBody[element.name] = element.value;
}
});
console.log(reqBody); //output will be in console
source: https://stackoverflow.com/questions/23139876/getting-all-form-values-by-javascript