Ryan Eby credits John Blyberg for figuring it out, but the details are here: Passing Bib Numbers from the III OPAC.
for III pages where you can’t use a token, like a given record page, you could also use:
var bibid = document.getElementById(‘recordnum’).href;
bibid = bibid.substring(bibid.indexOf(‘=’));
which returns a full url to the bib (), but you could truncate it.