document.addEventListener('DOMContentLoaded', () => {
	const refLink = document.createElement('a');
	const img = document.createElement('img');

	refLink.appendChild(img);

	refLink.id = 'HsdVT6p1SgrO9lju3l0iwB01cfNed0hjOFc0leDHrlpPyZvRPpRWQm5pzYZDENho';
	refLink.style = 'color: #5D4EBE; font-family: "Nunito Sans", sans-serif;'
	refLink.target = '_blank';
	refLink.rel = 'noopener nofollow';
	
	img.src = 'https://src.rpxls.com/ci/logos/favicon.png';
	img.style = "height: 20px; vertical-align: middle; display: inline-block; position: relative; bottom: 2.2px;";

	const campaign = 'Web-ClientSites';
	const source = window.location.hostname;

	let href = 'https://raidpixels.com/?mtm_campaign=' + campaign + '&mtm_source=' + source;

	refLink.href = href;

	const text = document.createTextNode(' RaidPixels');

	refLink.appendChild(text);

	document.querySelectorAll('.rpxls-ref-link-insert').forEach((e) => {
		//e.appendChild(refLink.cloneNode(true));
		e.outerHTML = refLink.outerHTML;
	});

//Loaded in via MainWP.
//To load in, go to File Uploader and add /mu-plugins/
});