HamsterDefaultEmbed

Defaults dropdown value to "Direct link"

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

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