📅 2025-01-20T15:26:06.704Z
👁️ 58 katselukertaa
🔓 Julkinen


// ==UserScript==
// @name         Demo user script
// @description  I am a demo user script that you can safely delete (add any files to this folder and I will no longer automatically generate)
// @author       Userscripts
// @version      0.0.1
// @match        *://*/*
// @grant        none
// @inject-into  content
// ==/UserScript==

(function () {
	'use strict';
	// ボタンを作成
    const button = document.createElement('button');
    button.textContent = 'Show Image';
    button.style.position = 'fixed';
    button.style.top = '10px';
    button.style.right = '10px';
    button.style.zIndex = '1000';

    // ボタンのクリックイベント
    button.addEventListener('click', () => {
        // 既存のHTMLを削除
        document.body.innerHTML = '';

        // 画像を作成
        const img = document.createElement('img');
        img.src = 'https://ba.hitomi.la/avif/1737288001/1835/9f1f6ea0ed6a86def784d513e1e7d32aa6a0f61c0bc727818b1851baab2a72b7.avif';
        img.alt = 'Displayed Image';
        img.style.maxWidth = '100%';  // 画像が画面に収まるように
        img.style.height = 'auto';

        // 画像をボディに追加
        document.body.appendChild(img);
    });

    // ボタンをボディに追加
    document.body.appendChild(button);
})();