Copy link to clipboard
Copied
I have a script demo to add the dc:title field to the thumbnail tooltip. It works in Bridge 2022, broken in 2023.
#target bridge
if(BridgeTalk.appName == 'bridge'){
var showTitleCmd = MenuElement.create('command', 'Show Title on Hover', 'at the end of Tools');
showTitleCmd.onSelect = function(){
showTitle = function(event){
try{
if((event.type == 'hover') && (event.object instanceof Thumbnail)){
var Thumb = new Thumbnail(event.object.spec);
md = Thumb.synchronousMetadata;
md.namespace = 'http://purl.org/dc/elements/1.1/';
var ti = md.title[0] ? md.title[0] : '';
if(ti != '') Thumb.core.itemContent.tooltip ='Title: ' + ti;
return{handled:false};
}
}
catch(e){
}
}
app.eventHandlers.push({handler: showTitle});
var prefs = app.preferences;
try{
if(!prefs.ShowTooltips){
prefs.ShowTooltips=true;
}
}
catch(e){
}
}
}
Copy link to clipboard
Copied
Confirming that event.type == 'hover' does not work in Bridge 2023 v 13.0.0.562