Perchance no ads

Change css to hide all the banners.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==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()');
        });
    });
})();