I hereby claim:
- I am mrvdog on github.
- I am mrvdog (https://keybase.io/mrvdog) on keybase.
- I have a public key ASDYC-lCGmWZUerpTL6bjeXomVnvcI1mVDatjBWzsw6Euwo
To claim this, I am signing this object:
(() => { | |
if ( | |
!document.querySelector("#AWDToolbar") | |
&& | |
window.location.href.match(/(awdealers\.dev|awdealers\.co\.uk|awpreview\.co\.uk)/) | |
) { | |
const heading = document.createElement("div"); | |
heading.style.display = "block"; | |
heading.style.background = '#323639'; |
(() => { | |
Array.from(document.querySelectorAll('img'), async elm => { | |
const src = await fetch(elm.src); | |
if ( src.status !== 200 ) { | |
if ( elm.src.includes("awdealers.dev") ) { | |
console.log(`Replaced missing image`, src.url, `with`, src.url.replace('awdealers.dev', 'awdealers.co.uk')); | |
elm.setAttribute('src', `${src.url.replace('awdealers.dev', 'awdealers.co.uk')}`); | |
} else { | |
console.log(`Replaced missing image`, src.url, `with a placeholder`); | |
elm.setAttribute('src', `https://via.placeholder.com/${ |
I hereby claim:
To claim this, I am signing this object: