trying to change the inventory pane

Vurt834
15 Mar 2024, 00:53

I have customized the inventory pane as much as I can, but I've failed to change the colors on the side of where the inventory objects are listed...it's the grey elements on the far right. Anyone know how to do this? Any help would be appreciated.

inventory-pane


mrangel
15 Mar 2024, 11:14

I 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:12

Thanks! I'll give that a try


Vurt834
15 Mar 2024, 21:00

worked like a charm:

Capture

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:12

Looks 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');")