Hides all photopea source Code alerts
// ==UserScript==
// @name Photopea Source Code Alert Killer
// @namespace http://tampermonkey.net/
// @version 2026-04-24
// @description Hides all photopea source Code alerts
// @author You
// @match https://www.photopea.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=photopea.com
// @grant none
// @license MIT
// ==/UserScript==
(function() {
'use strict';
const targetText = "Something is changing our source code";
function killPopup() {
const xpath = `//div[contains(text(), '${targetText}')]`;
const result = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
const node = result.singleNodeValue;
if (node) {
node.remove();
console.log("Alert Destroyed");
}
}
const observer = new MutationObserver((mutations) => {
killPopup();
});
observer.observe(document.body, { childList: true, subtree: true });
killPopup();
})();