Uncategorized

How to Remove Photopea Ads Sidebar and Make it Full Width

In this article, I will share a trick to remove advertisement banners and the sidebar containing ads completely from photopea.com, a web-based solution to to edit your photos in real time like Photoshop.

In short, you will be able to use photopea.com without ads sidebar with full-width edit screen experience

We will use this trick and implement it on these three major web browsers:

  1. Google Chrome
  2. Microsoft Edge
  3. Mozilla Firefox

Let’s get started…

Google Chrome & Microsoft Edge

Step 1 : Go to photopea.com right click and select inspect


Step 2: Go to SourcesSnippets ➜ create a New snippet and name it photopea (You can name it anything)


Step 3: Copy this code snippet and paste it over there and sava the snippet using CTRL + S (in windows) or Command + S (in Mac)

document.head.insertAdjacentHTML(
  "beforeend",
  "<style>.app > :first-child,.panelblock.mainblock{flex: 1 }body > div.flexrow.app > div:nth-child(1) > div:nth-child(3){width:100% }</style>"
);

document.querySelector(".app > :last-child").remove();

const hk_canvas_body = document.querySelector(
  ".panelblock.mainblock > .block > .body"
);

const hk_panelhead = document.querySelector(".panelblock.mainblock .panelhead");

const hk_canvas = document.querySelector(".panelblock.mainblock .pbody canvas");

function hk_photopea() {
  hk_canvas_body.style.width = "100%";
  hk_canvas.style.width = "100%";
  hk_panelhead.style.maxWidth = "100%";
}

hk_photopea();

new MutationObserver((x) => {
  for (let y of x) {
    if (y.type === "attributes") {
      hk_photopea();
    }
  }
}).observe(hk_canvas_body, {
  attributes: true,
});

Step 4: Right click on your snippet and click on Run. Boom, that’s all.


Note: Your snippet will save in your browser but you will have to re-run it every time you refresh your current browser window.

Mozilla Firefox

Step 1 : Go to photopea.com right click and select inspect


Step 2: Go to Console click on book icon to switch to multi line editor


Step 3: Copy this code snippet and paste it over there, then click on Run

document.head.insertAdjacentHTML(
  "beforeend",
  "<style>.app > :first-child,.panelblock.mainblock{flex: 1 }body > div.flexrow.app > div:nth-child(1) > div:nth-child(3){width:100% }</style>"
);

document.querySelector(".app > :last-child").remove();

const hk_canvas_body = document.querySelector(
  ".panelblock.mainblock > .block > .body"
);

const hk_panelhead = document.querySelector(".panelblock.mainblock .panelhead");

const hk_canvas = document.querySelector(".panelblock.mainblock .pbody canvas");

function hk_photopea() {
  hk_canvas_body.style.width = "100%";
  hk_canvas.style.width = "100%";
  hk_panelhead.style.maxWidth = "100%";
}

hk_photopea();

new MutationObserver((x) => {
  for (let y of x) {
    if (y.type === "attributes") {
      hk_photopea();
    }
  }
}).observe(hk_canvas_body, {
  attributes: true,
});

Note: Unlike Google Chrome and Microsoft Edge, there is no option in Mozilla Firefox to save your snippet and use it later. So you will have to paste this code every time you refresh your page.

Watch out this video tutorial to have a visual grasp on the topic…

Syed Kazim Ali Shah

A Blogger, a full-stack web developer, and the CTO of WebPlover Ltd, Kazim Shah is passionate about coding, development, and SaaS applications since 2014. With an extensive career in freelancing since 2016, he has garnered invaluable experience in the realms of web development and digital entrepreneurship. Through his blogs, he shares insights, tips, and strategies to navigate the dynamic digital landscape successfully. Feel free to reach out to him at kazimshah130@gmail.com or connect on +92 333 9081 488.

View Comments

  • Elvis Furtado says:

    Thanks for this, much needed :)

    • Syed Kazim Ali Shah says:

      Thanks to inform, I updated the code snippet. Please use the updated code.

      • Hi!
        Thx for ur effort!
        It looks great at splash screen, but after start a new project, there will be an empty bar.
        https://i.imgur.com/yiGzrjI.png
        I can't fix it, cause i'm underqualificated, so im appreciated for your effort.

      • Almost ok.
        At spalsh screen looks great, but when i want to work there will an empty bar between the work area and right toolbar.
        https://i.imgur.com/yiGzrjI.png
        Could u fix it?
        Thx

  • try right clicking a layer, the dialogue comes up in wrong place.

    try using a brush, it paints wrong spot

Recent Posts

Color Theory for Designers – Understand Material Design Colors

Color plays an essential role in design and everyday life. It can draw your attention…

3 years ago

WhatsApp vs Telegram vs Signal – What should you use | Complete Guide

Have you ever been creeped out by an ad appearing in your social media feed…

3 years ago

Best Image Format for Your Website. JPEG vs PNG vs GIF vs SVG

Imagine you have just finished working on your favorite image-editing program and your masterpiece is…

4 years ago

How to Highlight Current Active Page Link in WordPress [with Pictures]

If you want to highlight the current active page link anywhere in your WordPress website…

4 years ago

Solution for Clipboard not Working in Android 10

Hey, guys! All of you who were using any clipboard on their mobile phones must…

4 years ago

How to Hide Title from a Post or Page in WordPress

Do you want to hide the title from your post or page? This is a…

4 years ago