F95 Auto Open Filter Drawer

Automatically open the filter drawer when visiting the Latest Update page for the first time.

Fra 07.07.2025. Se den seneste versjonen.

// ==UserScript==
// @name        F95 Auto Open Filter Drawer
// @namespace   1330126-edexal
// @match       *://f95zone.to/sam/latest_alpha/*
// @grant       none
// @icon        https://external-content.duckduckgo.com/ip3/f95zone.to.ico
// @license     Unlicense
// @version     1.0
// @author      Edexal
// @description Automatically open the filter drawer when visiting the Latest Update page for the first time.
// ==/UserScript==
(() =>{
  function getRandomInt(min, max) {
    const minCeiled = Math.ceil(min);
    const maxFloored = Math.floor(max);
    return Math.floor(Math.random() * (maxFloored - minCeiled)) + minCeiled;
  }

  function openDrawer(){
    let randint = getRandomInt(900,1500);
    setTimeout(() => {
      let drawerButton = document.querySelector('#controls_filter-toggle');
      drawerButton.click();
    }, randint);
  }

  openDrawer();
})();