I was looking into finding a better solution to this with the help of a javascript bookmarklet. I've have some help from the aaron, but still not there yet. Though I was looking through the console log on Chrome this morning and the event logs. I think this would be super easy to implement a 3rd double click modifier that's not currently being used. This is really low hanging fruit that adds some quality of life. This is the current code used to open the character's page to either the Bio and Info tab or the Attributes tab. t.on("dblclick", function (e) {
if (e.target && "text" == e.target.type) d20.engine.editText(e.target, e.pageX, e.pageY);
else if (e.target && "image" == e.target.type && e.target.model)
if ((e.e.e.shiftKey || e.e.e.altKey) && "" !== e.target.model.get("represents")) {
console.log("Show token's character...");
var t = d20.Campaign.characters.get(e.target.model.get("represents"));
if (t) {
var n = t.get("inplayerjournals").split(",");
(window.is_gm || -1 !== _.indexOf(n, "all") || window.currentPlayer && -1 !== _.indexOf(n, window.currentPlayer.id)) && t.view.showDialog()
}
e.e.e.altKey ? $(".dialog[data-characterid=" + e.target.model.get("represents") + "] .characterviewer ul.nav a[data-tab='attributesabilities']").trigger("click") : $(".dialog[data-characterid=" + e.target.model.get("represents") + "] .characterviewer ul.nav a[data-tab='bioinfo']").trigger("click")
} else e.target.model.trigger("showtokeneditor")
}); It's clear where they're intercepting the double click and hotkey. This could easily be re-written to include an additional case statement or a switch statement like below. t.on("dblclick", function (e) {
if (e.target && "text" == e.target.type) d20.engine.editText(e.target, e.pageX, e.pageY);
else if (e.target && "image" == e.target.type && e.target.model)
if ((e.e.e.shiftKey || e.e.e.altKey || e.e.e.ctrlkey) && "" !== e.target.model.get("represents")) {
console.log("Show token's character...");
var t = d20.Campaign.characters.get(e.target.model.get("represents"));
if (t) {
var n = t.get("inplayerjournals").split(",");
(window.is_gm || -1 !== _.indexOf(n, "all") || window.currentPlayer && -1 !== _.indexOf(n, window.currentPlayer.id)) && t.view.showDialog()
}
switch (e.e.e) {
case altkey
? $(".dialog[data-characterid=" + e.target.model.get("represents") + "] .characterviewer ul.nav a[data-tab='attributesabilities']").trigger("click")
break;
case shiftKey
$(".dialog[data-characterid=" + e.target.model.get("represents") + "] .characterviewer ul.nav a[data-tab='bioinfo']").trigger("click")
break;
case ctrlkey && $charsheet != null
$(".dialog[data-characterid=" + e.target.model.get("represents") + "] .characterviewer ul.nav a[data-tab='charsheet']").trigger("click")
break;
default:
}
} else e.target.model.trigger("showtokeneditor")
});
I'm not 100% on the null check in javascript. I know further in the source there's a function to get the character sheet (as charsheet) for the campaign though. For those unaware, this would probably be needed for games that do not have a character sheet chosen or included. I'm surprised this hasn't been implemented. I've seen complaints about this in several places, and it's a major annoyance. I'm going to add to this, that I think the the dialog that opens should autosize to better fit the contents of the character sheet when doing this. For example, when you open an NPC sheet vs a PC sheet in the 5e OGL sheet. There are two very distinct width differences. There should be a way to either fit all contents (which could be unimaginably large), or the sheet creator somehow could specify the default open to size in width and height.