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

[Bookmarklet] Sort Transmogrifier

1491764932
The Aaron
Pro
API Scripter
javascript:$('iframe').contents().find('.objects').each((c,e)=>{ let $e=$(e); $e.children().sort( (a,b)=>{ let name1=$(a).find(".name").text().toLowerCase(), name2=$(b).find(".name").text().toLowerCase(), comp = name1.localeCompare(name2); return comp; }) .each((i,c)=>$e.append(c)); }); This is a bookmarklet that will sort your transmogrifier lists.  In Chrome, just make a new bookmark with the above as the link.  When you have the transmogrifier open and select this link, it will sort the currently open lists.  You'll need to run it again when you choose a new list or after dragging things across to get the list back in order. Happy Rolling!
1491765879
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Added to my folder of The Aaron Bookmarklets.
1491768650
The Aaron
Pro
API Scripter
=D
Yeees. Aaron have you thought of making browser extention with little fixes like that for roll20 site or would it be too much work?
1491771720
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Also to the point, do you have a bookmarklet library/depository?
1491771792
The Aaron
Pro
API Scripter
I have considered a Roll20 Specific browser extension in the past.  I've written several, one a commercial product for the company I work for. However, it's not risen to the top of the priority stack yet. =D
1491771908
The Aaron
Pro
API Scripter
keithcurtis said: Also to the point, do you have a bookmarklet library/depository? Just this:&nbsp; <a href="https://app.roll20.net/forum/post/2344777/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/2344777/slug%7D</a>
1491772058
vÍnce
Pro
Sheet Author
Added to my list of Aaron's other awesome bookmarklets...
1491772314
vÍnce
Pro
Sheet Author
The Aaron said: keithcurtis said: Also to the point, do you have a bookmarklet library/depository? Just this:&nbsp; <a href="https://app.roll20.net/forum/post/2344777/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/2344777/slug%7D</a> Added/updated. &nbsp;;-)
1491772499

Edited 1491772881
The Aaron
Pro
API Scripter
You don't have this one: javascript:(function(){ "use strict"; $('body').keydown(function(e) { var n,o,t; if( e && e.altKey && (48 &lt;= e.keyCode) && (58 &gt;= e.keyCode) ){ n=e.keyCode - ( 48===e.keyCode ? 38 : 49 ); o=$('#secondary-toolbar ul.mode.tokenactions'); if(o && 'none' !== o.css('display')) { t=o.children()[0].children[n]; if(t) { t.click(); } } } }); }()); It lets you hit alt-1 through alt-0 to activate one of the first 10 Token Action buttons on the selected token. =D Edit: corrected that one...
1491773794
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Aaron said: You don't have this one: javascript:(function(){ "use strict"; $('body').keydown(function(e) { var n,o,t; if( e && e.altKey && (48 &lt;= e.keyCode) && (58 &gt;= e.keyCode) ){ n=e.keyCode - ( 48===e.keyCode ? 38 : 49 ); o=$('#secondary-toolbar ul.mode.tokenactions'); if(o && 'none' !== o.css('display')) { t=o.children()[0].children[n]; if(t) { t.click(); } } } }); }()); It lets you hit alt-1 through alt-0 to activate one of the first 10 Token Action buttons on the selected token. =D Edit: corrected that one... Same key on the Mac? Alt/Option doesn't usually invoke a command.
1491781216
The Aaron
Pro
API Scripter
Yeah, same command (I'm on a Mac!). Have to have the map focused.&nbsp;
You just saved me a lot of time. The Transmogrifier was such a pain. Aaron gets 5,000 XP!
1491785222

Edited 1491785262
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Aaron said: Yeah, same command (I'm on a Mac!). Have to have the map focused.&nbsp; Phew. Otherwise, playing my favorite character, Sir ¡&trade;£¢ of ∞§¶•ªº would be difficult.
1491787267
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The Aaron said: You don't have this one: javascript:(function(){ "use strict"; $('body').keydown(function(e) { var n,o,t; if( e && e.altKey && (48 &lt;= e.keyCode) && (58 &gt;= e.keyCode) ){ n=e.keyCode - ( 48===e.keyCode ? 38 : 49 ); o=$('#secondary-toolbar ul.mode.tokenactions'); if(o && 'none' !== o.css('display')) { t=o.children()[0].children[n]; if(t) { t.click(); } } } }); }()); It lets you hit alt-1 through alt-0 to activate one of the first 10 Token Action buttons on the selected token. =D Edit: corrected that one... *Jaw Dropped*
1491787306
The Aaron
Pro
API Scripter
BWAHAHAHAHA!!
1491789788
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hmm. I think I will need to re-name my token actions for this eventuality...
Too cool for words...thank you :-)
1491920766

Edited 1491920900
New to the concept of bookmarklets, so probably not doing something that is simple to fix.&nbsp; I cannot seem to get the transmogrifier to sort. Created the marklet, have the transmogrifier open, nothing happens. I have gotten the bookmarklet for using alt # with the first 10 macros to work. And the chat size font as well. Both are very welcome utilities. Much appreciated. I have one player who has trouble reading, the alt# will probably be a game changer for him, he just has to memorize the number associated with what he wants to do.&nbsp;
1491921925
The Aaron
Pro
API Scripter
Can you screenshot your bookmarklet and the javascript console?
This is the script I have in the url part javascript:$('iframe').contents().find('.objects').each((c,e)=&gt;{ let $e=$(e); $e.children().sort( (a,b)=&gt;{ let name1=$(a).find(".name").text().toLowerCase(), name2=$(b).find(".name").text().toLowerCase(), comp = name1.localeCompare(name2); return comp; }) .each((i,c)=&gt;$e.append(c)); });
1491931198
The Aaron
Pro
API Scripter
hmm... that was less helpful than I was hoping. =/