trying to change the inventory pane
mrangel
15 Mar 2024, 11:14I assume you'd be using something like this: https://www.w3schools.com/howto/howto_css_custom_scrollbar.asp
As the scrollbar is a pseudo-element, not actually part of the page, you can't add direct styles to it. So if your existing styles are applied directly, you'll need to do this one by adding a <style>
element. I'd suggest using the UI Initialisation script to add a style block to the document head.
I'm not sure what version of chromium the desktop player uses, though… I know it's old, but I'd hope it isn't old enough for this style to be unsupported.
Vurt834
15 Mar 2024, 16:12Thanks! I'll give that a try
Vurt834
15 Mar 2024, 21:00worked like a charm:
code I used: JS.eval("var css = '*::-webkit-scrollbar { height: 10px; width: 10px !important; } *::-webkit-scrollbar-track { border-radius: 5px !important; background-color: #000000 !important; border: 2px solid #00F300 !important; } *::-webkit-scrollbar-thumb { border-radius: 5px !important; background-color: #00F300 !important; } *::-webkit-scrollbar-button { display: none !important; }'; var style = document.createElement('style'); style.type = 'text/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } document.head.appendChild(style);")
mrangel
16 Mar 2024, 08:12Looks good :)
Although Quest mostly uses jQuery, so I would probably have tried to stay consistent, doing something like:
JS.eval("$('<style>').text('*::-webkit-scrollbar { height: 10px; width: 10px !important; } *::-webkit-scrollbar-track { border-radius: 5px !important; background-color: #000000 !important; border: 2px solid #00F300 !important; } *::-webkit-scrollbar-thumb { border-radius: 5px !important; background-color: #00F300 !important; } *::-webkit-scrollbar-button { display: none !important; }').appendTo('head');")