Folder Tab Label Spacing
ENGLISH
This small script automatically adds spacing between the folder icon and the name of every folder tab in Directory Opus. It makes folder tabs slightly easier to read. As far as I can tell, Directory Opus does not provide a native setting for adjusting this spacing.
To increase or decrease the spacing, simply change the number of \u00A0 sequences in the cmd.RunCommand line.
My small scripts are nothing fancy, but I have chosen to share them in both English and French so that French-speaking DOpus users are not left out. The descriptions, comments, and instructions will therefore be bilingual. Only the JavaScript filenames will remain in English.
FRANÇAIS
Ce petit script ajoute automatiquement un espace entre l’icône du dossier et le nom de chaque onglet dans Directory Opus. Cela améliore légèrement la lisibilité des onglets de dossiers. À ma connaissance, Directory Opus ne propose aucun réglage natif pour ajuster cet espacement.
L’écart peut être augmenté ou réduit en modifiant simplement le nombre de séquences \u00A0 dans la ligne cmd.RunCommand du script.
Mes petits scripts sont sans prétention, mais j'ai choisi de les partager en français et en anglais afin qu’ils restent accessibles aux utilisateurs francophones de DOpus. Descriptions, commentaires et instructions seront bilingues ; seul le nom du fichier JavaScript restera en anglais.
function OnInit(initData) {
initData.name = "Folder Tab Label Spacing";
initData.desc = "🇬🇧 Automatically adds a space between the icon and the name of every folder tab.\r\nTo adjust the spacing, change the number of `\\u00A0` sequences in the `cmd.RunCommand` line.\r\n\r\n🇫🇷 Ajoute automatiquement un espace entre l’icône et le nom de tous les onglets.\r\nPour ajuster l’écart, modifier le nombre de \\u00A0 dans la ligne cmd.RunCommand.";
initData.version = "2026-07-31";
initData.default_enable = true;
initData.min_version = "13.0";
initData.copyright = "© 2026 Fredisland";
}
function OnAfterFolderChange(data) {
if (!data.result) return;
var cmd = DOpus.Create.Command();
cmd.SetSourceTab(data.tab);
// Non-breaking spaces followed by the dynamic folder name.
// Espaces insécables suivis du nom dynamique du dossier.
cmd.RunCommand('Go TABNAME="\u00A0\u00A0%N"');
}
FolderTabLabelSpacing.js.txt (956 Octets)
