Skip to content

Instantly share code, notes, and snippets.

@nimatrueway
Forked from katopz/photopea-hide-ads.md
Last active February 10, 2022 08:41
Show Gist options
  • Save nimatrueway/69490e806a98757e718e6e823637b075 to your computer and use it in GitHub Desktop.
Save nimatrueway/69490e806a98757e718e6e823637b075 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','position: fixed; top: 100vh')

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 :)

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