HamsterDefaultEmbed

Defaults dropdown value to "Direct link"

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

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

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        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);