Better Transmission TabsContainer

A userscript to make Transmission-Web's TabsContainer better

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

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

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         Better Transmission TabsContainer
// @namespace    npm/vite-plugin-monkey
// @version      0.0.4
// @author       Fabio Tea <[email protected]> (iam.f4b.io)
// @description  A userscript to make Transmission-Web's TabsContainer better
// @license      MIT
// @icon         https://cdn.imgchest.com/files/j7kzcn6kwk7.png
// @match        *://*/transmission/web/
// @require      https://cdn.jsdelivr.net/npm/@violentmonkey/dom@2
// @grant        none
// ==/UserScript==

(function () {
  'use strict';

  /*! @violentmonkey/[email protected] | ISC License */
  var _VM;
  Object.assign(typeof VM !== "undefined" && ((_VM = VM) == null ? void 0 : _VM.versions) || {}, {
    dom: "2.1.7"
  });
  function observe(node, callback, options) {
    const observer = new MutationObserver((mutations, ob) => {
      const result = callback(mutations, ob);
      if (result)
        disconnect();
    });
    observer.observe(node, Object.assign({
      childList: true,
      subtree: true
    }, options));
    const disconnect = () => observer.disconnect();
    return disconnect;
  }
  observe(document.body, () => {
    const toolbarInspectorButton = document.querySelector("#toolbar-inspector");
    if (toolbarInspectorButton) {
      toolbarInspectorButton.addEventListener("click", () => {
        const tabsContainer = document.querySelector(".tabs-container");
        if (tabsContainer) {
          tabsContainer.style.resize = "horizontal";
          tabsContainer.style.overflow = "auto";
          tabsContainer.style.width = "900px";
        }
      });
    }
  });

})();