Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Tip: how to have the macro bar on multiple lines

November 21 (11 years ago)

Edited November 28 (11 years ago)
I've searched a little around, and the general feeling I got is that it can't be done.
Well, I've put together a not-so-pretty hack which seem to work for me, so maybe it can be of use to others, or maybe somebody has improvements, or reasons about why I shouldn't be doing this :P

Make a bookmark in this way:
1. go in your bookmarks menu
2. right-click somewhere and select "new bookmark"
3. write this thing as the URL of the bookmark:
javascript:(function(){ $("#playerzone .player").css("display", "none"); $("#macrobar_macros").css("white-space", "normal"); $("#macrobar").css("height", "auto"); $("#macrobar_macros .macrobox .btn").each(function(){ $(this).text( $(this).text().replace(/[^:]+: /, "")); }); $("#initiativewindow").css("width", "100px").parent().css("width", "100px"); })();
4. give it a name and save
5. after the tabletop has fully loaded, click on this bookmark

It actually does a couple of things:
- Puts the macros on multiple lines
- Hides the bar with the player names (maybe that's unnecessary, in my first test it went over the macro bar so I hid it)
- Hides all the occurrences of your player's name from the macro buttons
- Shrinks the "Turn Order" box a little

Note: This is quite harmless, in the worst case scenario F5-ing will make everything back as it was before (it only alters the in-memory style sheet), but please don't put random javascript in your browser if you don't know what you're doing. Random-person-on-the-internets-myself is not taking responsibility of anything anyway.

Thoughts?
November 21 (11 years ago)
Cool, this would be awesome. I will have to try it. I have always been frustrated by the Macro bar not lapping into a second row when it runs off screen..
November 21 (11 years ago)
Looks like a wicked thing to do! I'm not using macros much in my game, but some game I played in would definitely benefit from it!
November 22 (11 years ago)
Its not doing anything for me? does it matter for the browser type, or am I putting it in wrong? Does it need to replace everything in the Address bar or add on to it?
November 22 (11 years ago)
Thank you! Yes the browser type matters.
In chrome, it's easier to replace everything in the address bar with that string.
In firefox, this seem to be doable only through the javascript console (ctrl-shift-J, copy/paste that string without the "javascript:" at the beginning).

November 23 (11 years ago)
Finderski
Pro
Sheet Author
Compendium Curator
Pretty cool trick. For those using Safari, you just need to make sure that "Enable JavaScript from Smart Search Field" is enabled. That can be found under the Develop Menu.
November 23 (11 years ago)
I'm running chrome and this isn't working for me. I've tried just pasting it into my URL box, and I've also tried pasting everything sans the javascript designator at the beginning into the javascript console... Any ideas?
November 23 (11 years ago)
It may be a couple of things:
1. first... make sure the page has fully loaded... just in case
2. I just noticed that (the latest version of?) chrome prevents you from copy-pasting javascript in the URL bar, it automatically removes the initial "javascript:", so maybe check that it is still there after you paste it;
3. maybe the page structure is a slightly different on slightly different browsers...
November 23 (11 years ago)

Simone B. said:

2. I just noticed that (the latest version of?) chrome prevents you from copy-pasting javascript in the URL bar, it automatically removes the initial "javascript:", so maybe check that it is still there after you paste it;


This was it for me. I had to manually type in the

javascript:
at the beginning.


Thanks!

November 24 (11 years ago)
Not working, not sure what I am doing wrong.
Type this in (the console in firefox) $("#playerzone .player").css("display", "none"); $("#macrobar_macros").css("white-space", "normal"); $("#macrobar").css("height", "auto");
Got this error: [01:14:07.725] TypeError: $(...) is null
November 24 (11 years ago)

Edited November 24 (11 years ago)
I have mixed results with firefox too... have you tried the bookmark method described in the first post? It seems to work better with firefox.

If it still doesn't work can I ask you which firefox version are you running?

November 24 (11 years ago)
Ok the bookmark idea worked, I didn't even notice that part of the post ^_^, Thanks a bunch Simone, I like google chrome better but i've had some issues with it crasheing my getting error so now i'm using firefox until I get a new computer.
November 24 (11 years ago)
The bookmark worked for me! Thanks a ton for this! It's amazing!
November 24 (11 years ago)
I don't suppose you could make one of these to hide the turn order window? :P
November 24 (11 years ago)

Edited November 28 (11 years ago)
put this after the last ";"
$("[aria-labelledby=ui-id-9]").hide();
but instead of hiding it, maybe it's better to just make it very thin, so you know when your turn is :P
$("[aria-labelledby=ui-id-9]").css("width", "75px");
edit: or maybe $("[aria-labelledby=ui-id-7]").css("width", "75px"); ... not sure

updated first post
November 25 (11 years ago)
Hmmm, neither of those are working for me =/
November 26 (11 years ago)
This is very odd, it seems to be working for me now!

Once again, thanks for all the help!
November 28 (11 years ago)

Edited November 28 (11 years ago)
The "Turn Order" box seems a little different every time, that's why it didn't always work... I found a more reliable way to do that.
I also added some code to remove the multiple occurences of your player's name from the macro buttons.
I've updated the first post with all of this.
November 29 (11 years ago)
Man, you are just too cool! Thanks for this stuff!
December 01 (11 years ago)
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
With API you can make your macro bar scrollable.... something like this...


....then you can just click through them left and right.... find the one you need.