HamsterDefaultEmbed

Defaults dropdown value to "Direct link"

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name        HamsterDefaultEmbed
// @namespace   Violentmonkey Scripts
// @description Defaults dropdown value to "Direct link"
// @match       https://hamster.is/*
// @grant       none
// @license     GPL3
// @version     1.0.2
// @author      vandenium

// ==/UserScript==
// Changelog:
// - 1.0.2 - 2025/07/31
//   - add commented options for user configurability
// - 1.0.1 - 2025/07/31
//   - add 50ms delay
// - 1.0.0 - 2025/05/30
//   - Initial release

window.setTimeout(() => {
  const sel = document.querySelector('#uploaded-embed-toggle');
  if (sel) {

    /////////////////////////////////////////////////////////////////////
    // If you want to default to something else, just comment out the ///
    // currently active sel.value below and uncomment the one you want.//
    /////////////////////////////////////////////////////////////////////

    // sel.value = 'viewer-links';
    sel.value = 'direct-links';
    // sel.value = 'thumb-links';
    // sel.value = 'medium-links';
    // sel.value = 'bbcode-embed';
    // sel.value = 'full-bbcode-embed';
    // sel.value = 'medium-bbcode-embed';
    // sel.value = 'thumb-bbcode-embed';
    sel.dispatchEvent(new Event('change', { bubbles: true }));
  }
}, 50);