-
Notifications
You must be signed in to change notification settings - Fork 11
Replace empty bookmark title with best guess #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Some users remove the title and only keep the favicon when adding links to the bookmark toolbar, to improve appearance and save space. The bookmark library and sidebar will come up with a best guess for a bookmark title, if it's left empty. The title is constructed using the URI. Added this default Firefox behavior to Bookmark Search Plus 2.
Hello @jun1x , thank you for the contribution. I will look at integrating. However, the code is currently under major overhaul for 2.0.27 in order to realize the next optimization step of #5 which requires to split and move big chunks of code to the background task, Also, two considerations to ponder:
Let me know your thoughts. |
Hello @aaFn , First off, thank you for converting BMSP2 to a Web-extension. I understand this change will have to wait for now, it's more of a cosmetic improvement anyway. As for the memory concern. I did notice "Removed a memory leak due to URL object" in the changelog.txt There are 2 ways according to the MDN documentation, as I understand it. 1. Constructing a new object: let urlObj = new URL("https://www.github.com");
urlObj = null; urlObj is a local URL object with properties, href / host / pathname / etc. 2. Calling a static method: let urlStr = URL.createObjectURL(file/blob/mediasource);
URL.revokeObjectURL(urlStr); urlStr is just a DOMString, no properties. Currently: I could be wrong, but I don't think it can work because the return value of 'new URL(...)', a URL object, Let me know what you think. Thanks, Jun1x |
Hi @jun1x , indeed re-reading the URL MDN page I believe you are correct ... so my URL.revokeObjectURL(...) don't have any effect I believe ;-) I did that when I was chasing big memory consumptions and thought this could be a source .. I found later that apparently this is So I will probably clean fetchFavicon .. no need to keep anything unuseful. Back to your subject, ok if we are on things like 50 bookmarks, we are good by far .. :-) Ok, so I'll look at integrating when I aml finished with the current optimization step for #5. Thank you much, aaFn. |
Hello @jun1x , this is out tonight with 2.0.27. I had to adapt it to the new form of the code which in this case is differing in bkmkChanged() now. In terms of code management, I will see if I can accept that pull request and override it totally with 2.0.27 code just behind in GitHub, for the sake of acknowledging that suggestion in the records. Thank you, aaFn. |
Thank you, I'm looking forward to using version 2.0.28 |
It is published now, let me know if the function does not work as you expected. |
Some users remove the title and only keep the favicon when adding
links to the bookmark toolbar, to improve appearance and save space.
The bookmark library and sidebar will come up with a best guess
for a bookmark title, if it's left empty. The title is constructed
using the URI.
Added this default Firefox behavior to Bookmark Search Plus 2.
(See comment on commit for visual examples
jun1x@1b9a416#comments)