User:Harimaron/common.js

/*jshint esversion: 6 */ $(function {	'use strict';	function removeColors(ev) {		for (const el of document.querySelectorAll("#bodyContent span")) {			if (el.style.color) {				el.style.color = null;			}		}	}	for (const el of document.querySelectorAll(".ColorRemover")) {		let btn = document.createElement("button");		btn.type = "button";		btn.textContent = "Remove Colors";		btn.addEventListener("click", removeColors);		el.appendChild(btn);	} });