Trivially simple script to automatically decrease the horizontal margins on the chat and video containers on hextube. By default both left and right margins are 15px per container. I set them to 1px for a 56px gain in chat and video viewing area. It’s free real estate.

// ==UserScript==
// @name        New script hexbear.net
// @namespace   Violentmonkey Scripts
// @match       https://live.hexbear.net/c/movies*
// @grant       none
// @version     1.0
// @author      -
// @description 3/1/2024, 10:31:12 PM
// ==/UserScript==
(function() {
    'use strict';
      document.getElementById("chatwrap").style.paddingLeft="1px";
      document.getElementById("chatwrap").style.paddingRight="1px";
      document.getElementById("videowrap").style.paddingLeft="1px";
      document.getElementById("videowrap").style.paddingRight="1px";
})();
What is ViolentMonkey?

ViolentMonkey is an open source browser extension and small alternative to GreaseMonkey or TamperMonkey. It can run custom JavaScript in your browser for you automatically to modify page behavior. If you install the extension you can create a new script and copy and paste the one I wrote above. Always beware of installing untrusted scripts that you don’t understand.

  • Grebgreb [he/him]@hexbear.netM
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 months ago

    When the “ignore channel css” is ticked, all of the emotes are slightly larger, would it be easily possible to make a script make them a bit smaller like they are in the ugly mode?

    • neo [he/him]@hexbear.netOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 months ago

      How big should they be? I guess I didn’t know they were differently sized. But that seems possible.

      • Grebgreb [he/him]@hexbear.netM
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 months ago

        With the css stuff enabled they look like maybe they’re half as big, would it be possible to make them like 75% as big or variable if other people want to customize it?

        • neo [he/him]@hexbear.netOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          8 months ago

          Uncomment the bottom half (i.e. remove /* and */) and change 69px to whatever your heart wants. The way this works is 2 seconds after the page begins to load it will insert a rule into the stylesheet to override the emoji’s maximum height.

          // ==UserScript==
          // @name        New script hexbear.net
          // @namespace   Violentmonkey Scripts
          // @match       https://live.hexbear.net/c/movies*
          // @grant       none
          // @version     1.0
          // @author      -
          // @description 3/1/2024, 10:31:12 PM
          // ==/UserScript==
          (function() {
              'use strict';
                document.getElementById("chatwrap").style.paddingLeft="1px";
                document.getElementById("chatwrap").style.paddingRight="1px";
                document.getElementById("videowrap").style.paddingLeft="1px";
                document.getElementById("videowrap").style.paddingRight="1px";
          
                // Optional set custom emoji size.
                // Uncomment the lines below and change emojiHeight from the default 69px to whatever number you want.
                /*
                const emojiHeight = "69px";
                $(document).ready(function() {
                  setTimeout(function() {
                    for (const sheet of document.styleSheets) {
                      // This is, as generically as I can tell, the correct css ruleset.
                      // sheet.href has to be of local origin.
                      if (sheet.href === null && sheet.cssRules.length > 1) {
                        sheet.insertRule("#messagebuffer img { max-height: "+emojiHeight+";}", sheet.cssRules.length-1);
                      }
                    }
                  }, 2000)
                });
                */
          })();