Perchance no ads

Change css to hide all the banners.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Perchance no ads
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Change css to hide all the banners.
// @author       Antiokh
// @match        https://perchance.org/ai-text-to-image-generator
// @icon         https://www.google.com/s2/favicons?sz=64&domain=perchance.org
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Wait for the document to be fully loaded
    window.addEventListener('load', function() {
        // Select all iframe elements with the "allowfullscreen" attribute
        const iframes = document.querySelectorAll('iframe[allowfullscreen]');

        // Loop through each iframe and add the specified styles
        iframes.forEach(function(iframe) {
            iframe.style.position = 'fixed';
            iframe.style.top = '0';
            iframe.style.left = '0';
            iframe.style.height = '100vh';
            iframe.style.width = '100vw';
        });

        // Select all div elements with onclick="flagImage()"
        const flagImageDivs = document.querySelectorAll('div[onclick="flagImage()"]');

        // Loop through each div and update the onclick attribute
        flagImageDivs.forEach(function(div) {
            div.setAttribute('onclick', 'saveImageToComputer()');
        });
    });
})();