Better Transmission TabsContainer

A userscript to make Transmission-Web's TabsContainer better

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

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

})();