Skip to content

Instantly share code, notes, and snippets.

@katopz
Last active April 16, 2024 04:48
Show Gist options
  • Save katopz/fcfb49d8bc63ad59bd2ff88848cff4e9 to your computer and use it in GitHub Desktop.
Save katopz/fcfb49d8bc63ad59bd2ff88848cff4e9 to your computer and use it in GitHub Desktop.
How to hide photopea ads

Open console and run this for 0px width ads. (ads still working, adjust width size to suite your need)

document.querySelector("body > div.flexrow.app > div:nth-child(2)").setAttribute('style','max-width:0px')

document.querySelector("body > div.flexrow.app > div").setAttribute('style','width:100%')
document.querySelector("body > div.flexrow.app > div > div.flexrow > div.panelblock.mainblock").setAttribute('style','width:100%')
const style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '.fixme { min-width:fit-content;overflow:unset; }';
document.querySelector("body > div.flexrow.app > div:nth-child(1) > div.flexrow").appendChild(style)
document.querySelector("body > div.flexrow.app > div:nth-child(1) > div.flexrow > div.sbar.toolbar").className += " fixme"

Or completey remove ads (not cool for them tho, ads completely gone = no money = no good app)

document.querySelector("body > div.flexrow.app > div:nth-child(2)").remove()

document.querySelector("body > div.flexrow.app > div").setAttribute('style','width:100%')
document.querySelector("body > div.flexrow.app > div > div.flexrow > div.panelblock.mainblock").setAttribute('style','width:100%')
const style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '.fixme { min-width:fit-content;overflow:unset; }';
document.querySelector("body > div.flexrow.app > div:nth-child(1) > div.flexrow").appendChild(style)
document.querySelector("body > div.flexrow.app > div:nth-child(1) > div.flexrow > div.sbar.toolbar").className += " fixme"

HINT : Hide for more space purpose only, Do click ads to keep photopea web app alive :)

@JoshuaRifareal
Copy link

This still leaves an empty space for me, any workaround for this?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment