Tab-Labelizer - Extend the folder names shown in your tabs

Hi tbone, the one posted as 1.2 has the wrong version number.
I have updated it and added support for the script wizard.

Thanks wow! o)
I pulled that as v1.3 into the thread opening to avoid confusions.
Because there is SW support from now on, a small version increment surely doesn't hurt.

Do you mind removing all of your recent snippets and uploads to keep this thread a bit shaped?

Updated to v1.3.1:

  • fix to prevent error messages for empty tabs

@wow, thanks for the cleaning job! o)

Good pick up tbone.
Can we make that configurable? I would rather it say 'Empty Tab' than '-'.
You forgot to update the version in the script to 1.3.1. Perhaps this is something the SW could detect?

The script has progressed a lot since you first wrote this little gem. The first post is a little out of date, it does not talk about the setting the title. Might be worth doing a review.

I noted recently that dopus has built in ability to shorten a path. I does it in some dialogs. Do you know if that functionality is exposed?

Updated to v1.3.2:

  • version increase and configurable label for empty tabs

Yes, I agree. o) The thing is, I have another branched and enhanced version in "progress", I already mentioned it here: Tab-Labelizer - Extend the folder names shown in your tabs Now that was in August last year, oops. o) I'm going to overhaul the intro once that version is done.

A nice addition might be to show the FTP site bookmark name (if available) in the tab.

You can sort of get this already by adding this to the location config:

      "^ftp://SITE=(.*)\\?.*@.*//",
      "ftp://$1://",
      "^ftp://(.*)%20(.*)$",
      "ftp://$1 $2",
      "^ftp://(.*)%20(.*)$",
      "ftp://$1 $2",

But it's not ideal as I think you need to keep the last pairs (with the %20 stuff) if you want to handle site names with more than 2 spaces, and it won't handle other encoded characters. Running decodeUrl on the name should fix it up, but requires modifying the code.

With the above, you also end up with tab names like:
ftp://My Site Name//current folder

But this might be nicer:
My Site Name: current folder

I couldn't work out if there's a way to get that using the config alone. It seemed to lose the whole thing if I didn't keep the ftp:// prefix there, so I guess it's being handled specially.

Maybe an option for special FTP site handling might be nice? I could add it myself if you want, but I didn't want to fork the code & confuse things, and maybe you want to do it in a particular way.

Is it me or v.1.3.2 (latest one) doesnt work in DOpus 12? I get the path unfolding, but I dont see the path aliases changes.

What' you mean with "path unfolding" and "alias changes"? What type of location/path is it you see this?

Btw: I'd be happy to have updated this add-in and incorporate your suggestions as well, Leo.
Unfortunately, I didn't find the time and mood yet. So much more which is in the queue, damnit. o)

1 Like

this is how my new - opened tabs appear after default activation of the script..
I can see the unfolded path but none of the location name replacements (ex. C:\ = (sys) )

I have updated the script to 1.4.3

Changes:

  • Fix for aliases not working.
  • Added feature, show friendly FTP site name. Added new config item frendlyFtpHostName.
  • Added feature, show drive label instead of drive letter. Added new config item showDriveLabel.

Tab-Labelizer.js.txt v1.4.3 (35.1 KB)

This has been fixed.

Also discussed here Ftp path, Site name instead of Host address - #7 by Leo

Nice idea, this has been added. There is a new config for this frendlyFtpHostName, it is defaulted to true.

From this thread Drive labels on tabs?

This has been added, There is a new config for this showDriveLabel, it is defaulted to false.

I have updated the script to 1.5.0

Changes:

  • Added feature to set the title of the Standalone Viewer. Added new script config EnableVieweritleUpdate Defaulted to true.

Tab-Labelizer.js.txt v1.5.0 (37.0 KB)

image

@tbone Given the script now allows the Window, Tab, and Viewer titles to be updated, might be time for a rename? DOpus-Labelizer perhaps?

"EnableVieweritleUpdate" -> where is the missing "T"? Even in the code it's spelled wrong, wtf?! o)

Thanks for your updates! o)

Regarding the rename, I'm not so sure. "Labelizer" conflicts with the various titles being set for Windows/Viewers. Only tabs seem to have labels? So you might not make things much clearer when renaming "Tab-Labelizer" to "DOpus-Labelizer"(?). I'm not against a rename in general, but I don't think it's a necessary move, fixing some internals would make more sense to me. o)

Consistency is key....

I have updated the script to V1.5.1

Changes:

  • EnableVieweritleUpdate -> EnableViewerTitleUpdate
  • Performance improvement, only run when needed.

Tab-Labelizer.js.txt V1.5.1 (37.3 KB)

Any reason not to put the updated versions in the main post? I can edit it if needed, and if TBone (who owns the post & original versions) is OK with that.

I think TBone can edit it as well, unless I am mistaken. (Let me know if that is wrong! It is hard to check as I can edit everything with my account, and if I make a test account it won't own any posts old enough to test with.)

Hi folks, I am happy to update the main post, I was just a bit late to try v1.4.3 for myself first.
Then came v1.5.0 with the typo, which I thought was worth fixing before going on, which is now done, so let's do it! o)

Done, thanks! o)

1 Like

I have updated the script to V1.5.2

Changes:

  • When using showDriveLabel if the drive label cant be obtained fall back to the drive letter. I could not get Scripting.FileSystemObject to return the drive name for a VeraCrypt drive.

Tab-Labelizer.js.txt V 1.5.2 (37.6 KB)

Hi,
Thanks for a script!
I have "showDriveLabel: true", and everything is working well, except it doesn't show the drive label on tab while being in a drive root directory. In this case it shows drive letter instead.

What version do you have V1.5.2?

Some drives don't work, but your normal C drive should. Are able to share your extended config?
Check it for privacy leakage before sharing, PM it if you like.

I think I found the solution.

I've been making edits manually to "Tab-Labelizer.js" file, but in a script configuration panel all options were kept to their default values, so I changed them too and It worked. Now I see "drive label:" on the tab when drive root is opened.

Thank you anyway!

1 Like

Makes sense, you should not need to edit the js file to change the settings. This makes updating easier :slight_smile: