Pixlr Premium Content Remover

Removes premium features on Pixlr.com, because they are just on your way.

As of 30. 04. 2021. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Pixlr Premium Content Remover
// @version      1.0.0
// @description  Removes premium features on Pixlr.com, because they are just on your way.
// @author       HKR
// @match        https://pixlr.com/*
// @grant        none
// @namespace https://greasyfork.org/users/733211
// ==/UserScript==

(function() { try{
async function noPremiumFeatures() {
    if (window.location.href.indexOf("editor") > -1) {
        document.getElementById("tool-glitch").outerHTML = "";
        document.getElementById("tool-focus").outerHTML = "";
        document.getElementById("cutout-auto").outerHTML = '<a class="" id="cutout-auto"></a>';

			while(true) {
				await new Promise(r => setTimeout(r, 1));
					(function() {
						const overlayelements = document.getElementsByClassName("element-group");
						for (var step = 0; step < overlayelements.length; step++)
						{
							if (overlayelements[step].getElementsByClassName("wrap overlay premium").length > 0) 
								overlayelements[step].remove();

						}
					}
				)();
				await new Promise(r => setTimeout(r, 1));
					(function() {
						const overlayelements = document.getElementsByClassName("element-group");
						for (var step = 0; step < overlayelements.length; step++)
						{
							if (overlayelements[step].getElementsByClassName("wrap shape premium").length > 0) 
								overlayelements[step].remove();
						}
					}
				)();
				await new Promise(r => setTimeout(r, 1));
					(function() {
						const overlayelements = document.getElementsByClassName("element-group");
						for (var step = 0; step < overlayelements.length; step++)
						{
							if (overlayelements[step].getElementsByClassName("wrap sticker premium").length > 0) 
								overlayelements[step].remove();
						}
					}
				)();
				await new Promise(r => setTimeout(r, 1));
					(function() {
						const overlayelements = document.getElementsByClassName("element-group");
						for (var step = 0; step < overlayelements.length; step++)
						{
							if (overlayelements[step].getElementsByClassName("wrap border premium").length > 0) 
								overlayelements[step].remove();
						}
					}
				)();
				await new Promise(r => setTimeout(r, 1));
					(function() {
						const elements = document.getElementsByClassName("text-box premium");
						while (elements.length > 0) elements[0].remove();
					}
				)
			();
		}
    } else {
        document.getElementById("get-premium").outerHTML = "";
        document.getElementById("template-holder-title").outerHTML = "";
        document.getElementById("template-holder").outerHTML = "";
        document.getElementById("template-carousel").outerHTML = "";
        document.getElementById("recommended-view-more").outerHTML = "";
        document.getElementById("template-loading").outerHTML = "";
    }
}

let currentPage = location.href;

noPremiumFeatures();

setInterval(async function()
{
    if (currentPage != location.href)
    {
        currentPage = location.href;
        noPremiumFeatures();
        
}}, 100);} catch(err) {} })();