Soulgen AI Blur Remover

Remove blur paywall for images in Soulgen AI

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Soulgen AI Blur Remover
// @namespace    soulgen-ai-blur-remover
// @version      1.3
// @description  Remove blur paywall for images in Soulgen AI
// @match        https://www.soulgen.ai/*
// @match        https://www.soulgen.net/*
// @grant        none
// @license      GPL-2.0-only
// ==/UserScript==

(function() {
  'use strict';

  // Create a floating button to trigger the delete code
  var button = document.createElement('button');
  button.innerText = 'Remove Blur';
  button.className = "flex-1 xl:min-w-[128px] relative ml-2 xl:ml-4 btn h-10 min-h-[40px] bg-colorful rounded-full px-4 tracking-[0.4px] whitespace-nowrap";
  button.style.position = 'fixed';
  button.style.right = '20px';
  button.style.bottom = '20px';
  button.style.zIndex = '9999';
  document.body.appendChild(button);

  // Create a floating button to trigger the delete code
  var button2 = document.createElement('button');
  button2.innerText = 'Download';
  button2.className = "flex-1 xl:min-w-[128px] relative ml-2 xl:ml-4 btn h-10 min-h-[40px] bg-colorful rounded-full px-4 tracking-[0.4px] whitespace-nowrap";
  button2.style.position = 'fixed';
  button2.style.right = '20px';
  button2.style.bottom = '70px';
  button2.style.zIndex = '9999';
  document.body.appendChild(button2);

  // Add a click event listener to the button
  button.addEventListener('click', function() {
    deleteElements();
  });

  // Add a click event listener to the button
  button2.addEventListener('click', function() {
    download();
  });

  // Function to delete elements with classes that end with "backdrop-filter" or "abs-center"
  function deleteElements() {
    document.querySelectorAll('[class$="backdrop-filter"]').forEach(function(element) {
      element.remove();
    });

    document.querySelectorAll('[class$="modal-close"]').forEach(function(element) {
      element.remove();
    });

    document.querySelectorAll('.abs-center').forEach(function(element) {
      element.remove();
    });
  }

  function download() {
        const images = document.querySelectorAll('img[alt="soulgen ai"]');
        for (let i = 0; i < images.length; i++) {
            const img = images[i];
            const link = document.createElement('a');
            link.href = img.src;
            link.download = 'soulgen-ai-image-' + i + '.' + img.src.split('.').pop();
            link.click();
        }
  }
})();