Mini Browser Window

Adds a mini browser window with a customizable popup for changing the displayed website.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Mini Browser Window
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  Adds a mini browser window with a customizable popup for changing the displayed website.
// @author       Your Name
// @match        *://*/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Create the mini window container
    const miniWindow = document.createElement('div');
    miniWindow.style.position = 'fixed';
    miniWindow.style.bottom = '10px';
    miniWindow.style.right = '10px';
    miniWindow.style.width = '300px';
    miniWindow.style.height = '200px';
    miniWindow.style.border = '1px solid #ccc';
    miniWindow.style.overflow = 'hidden';
    document.body.appendChild(miniWindow);

    // Create the iframe inside the mini window
    const iframe = document.createElement('iframe');
    iframe.src = 'https://www.example.com'; // Default website URL
    iframe.style.width = '100%';
    iframe.style.height = '100%';
    iframe.style.border = 'none';
    miniWindow.appendChild(iframe);

    // Create the popup input for customizing the website URL
    const input = document.createElement('input');
    input.type = 'text';
    input.placeholder = 'Enter website URL';
    input.style.width = '100%';
    input.style.marginTop = '10px';
    miniWindow.appendChild(input);

    // Create the button to update the website
    const button = document.createElement('button');
    button.innerText = 'Update Website';
    button.style.width = '100%';
    button.style.marginTop = '10px';
    miniWindow.appendChild(button);

    // Add click event listener to update the iframe URL
    button.addEventListener('click', () => {
        const newUrl = input.value.trim();
        if (newUrl) {
            iframe.src = newUrl;
        }
    });
})();