[Ext] Add Bookmark Here ²

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
greatlord
Posts: 13
Joined: February 22nd, 2014, 4:34 am

Re: [Ext] Add Bookmark Here ²

Post by greatlord »

xeonx wrote:All Add Bookmark Here users,
Is there anyone who may be able to assist in porting this to WebExtensions so we can ensure this addon remains for Firefox, or help in finding those who can?
I wish I could. Did yuoo2k give you the source code?
Makyen
Posts: 16
Joined: June 17th, 2014, 9:18 pm

Re: [Ext] Add Bookmark Here ²

Post by Makyen »

greatlord wrote:
xeonx wrote:All Add Bookmark Here users,
Is there anyone who may be able to assist in porting this to WebExtensions so we can ensure this addon remains for Firefox, or help in finding those who can?
I wish I could. Did yuoo2k give you the source code?
Everyone already has the source code
The source code is downloaded to every computer which installs it, as is the case with almost all Firefox add-ons (and Chrome extensions). Add-on developers can obfuscate and/or minimize the code, but the code does exist on each machine. Having it already in a repository, might be helpful, but not needed. The license is the Mozilla Public License 1.1, so modifying it is permitted.

Having the source code doesn't help, much: WebExtensions just can't do it
Unfortunately, having the source code is of marginal utility. WebExtensions are quite different from "legacy" XUL based extensions (which ABH2 is). WebExtensions have almost no capability to change the browser UI (they can add a single button). The significant majority of the things ABH2 does are not remotely possible to do as a WebExtension. For example:
  • It's not possible to add an entry to any bookmark drop-down menu (i.e. no "Add Bookmark Here...")
  • It's not possible to change the Edit Bookmark Dialog (in any way)
  • It's not possible to change the Bookmarks menu (in any way)
  • It's not possible to change what happens when you click on the Bookmark Star
Mozilla's stated direction is that WebExtensions will never have the level of access to the browser UI necessary for WebExtensions based add-ons to change these things, because not permitting such changes makes Mozilla's development of Firefox easier.

So, basically, everything that ABH2 does is just not possible under WebExtensions.

What you'd have to do in WebExtensions
To get some semblance of what ABH2 does, you would have to create a new, completely different, interface to bookmarks, which the new extension would control. It would be permitted to show that interface in only one of: a popup, or a sidebar (not both; not select-able by option; must be hard-coded). You could add a context menu entry to the page, which could approximate the bookmark interface.

Instead of a official popup (or in addition to such popup), you can use a pseudo-popup, implemented in a separate window. Doing so would allow you to keep an interface open even when the user changes tabs, or otherwise changes focus away from a popup (normal popups automatically close when they loose focus, etc.).

But, basically, the entirety of the extension has to be re-implemented as a completely different user interface, this would likely include large portions of duplicated functionality with Firefox's existing interface. Even then, it would be incomplete, because the WebExtension API has no access to bookmark tags. Of necessity, such an interface would be almost completely separate from the browser UI. The only integration would be that you use the browser UI to open this new UI.

Some, potentially useful, functionality could be implemented with a context menu which basically duplicates the bookmark drop-down menu. I'd have to see a prototype of it to see how beneficially this might be. This would have to be a general context menu addition, as it's not possible to target the bookmark menu with a context menu change.

Options for continuing to use ABH2
Your only real options for continuing to use ABH2 are:
  1. Stay on Firefox 55, do not upgrade to Firefox 56+, or
  2. Switch to using Firefox 52 ESR, which will be supported until 2018-06-26.
Some possibilities for partial functionality
  • File bugs in Bugzilla requesting enhancements to Firefox for the main things you use from ABH2. While it's unlikely that Firefox will incorporate the level of customization which ABH2 permitted, it's not unreasonable for them to add small portions of the functionality (e.g. adding the "Add Bookmark Here" and "Open All in Tabs" entries in the bookmark drop-down menu are reasonable candidates).
  • Some of the style changes which ABH2 does for the bookmark dialog can probably be implemented through userChrome.css. See my post later in this topic for more details. Mostly, making changes this way has issues.
  • For your own personal use, it's also possible to modify the Firefox code, either the code which is compiled into the Firefox executable, or the JavaScript/CSS/HTML/XUL which is contained in the omni.ja files within the Firefox distribution. This is possible, but a pain in the rear. I did it for personal mods, which I eventually turned into a "legacy" extension, as that was about the same amount of work as having to perform the modifications each time Firefox updated.
    To implement this option would require continued development at a somewhat higher level of effort than has been needed in the past, but without the ability to ship the modifications to others as an extension. The current issue of not working with the changes in Firefox 56 would need to be resolved, and then FF57, etc. While possible, this is not an option with much appeal, except for things which someone personally finds *very* useful.
Last edited by Makyen on October 24th, 2017, 6:29 pm, edited 3 times in total.
User avatar
jamesejohnson
Posts: 16
Joined: July 12th, 2016, 9:44 am

Re: [Ext] Add Bookmark Here ²

Post by jamesejohnson »

Makyen wrote:
greatlord wrote:
xeonx wrote:All Add Bookmark Here users,
Is there anyone who may be able to assist in porting this to WebExtensions so we can ensure this addon remains for Firefox, or help in finding those who can?
I wish I could. Did yuoo2k give you the source code?
Everyone already has the source code
The source code is downloaded to every computer which installs it, as is the case with almost all Firefox add-ons (and Chrome extensions). Add-on developers can obfuscate and/or minimize the code, but the code does exist on each machine. Having it already in a repository, might be helpful, but not needed. The license is the Mozilla Public License 1.1, so modifying it is permitted.

Having the source code doesn't help, much: WebExtensions just can't do it
However, having the source code is of marginal utility. WebExtensions are quite different from "legacy" XUL based extensions (which ABH2 is). WebExtensions have almost no capability to change the browser UI (they can add a single button). The significant majority of the things ABH2 does are not remotely possible to do as a WebExtension. For example:
  • It's not possible to add an entry to any bookmark drop-down menu (i.e. no "Add Bookmark Here...", no "Open all in tabs")
  • It's not possible to change the Edit Bookmark Dialog (in any way)
  • It's not possible to change the Bookmarks menu (in any way)
  • It's not possible to change what happens when you click on the Bookmark Star
Mozilla's stated direction is that WebExtensions will never have the level of access to the browser UI necessary for it to change these things, because it makes their development easier.

So, basically, everything that ABH2 does is just not possible under WebExtensions.

What you'd have to do in WebExtensions
To get some semblance of what ABH2 does, you would have to create a new, completely different, interface to bookmarks, which the new extension would control. It would be permitted to show that interface in only one of: a popup, or a sidebar (not both; not select-able by option; must be hard-coded). You could add a context menu entry to the page, which could approximate the bookmark interface.

Instead of a official popup (or in addition to such popup), you can use a pseudo-popup, implemented in a separate window. Doing so would allow you to keep an interface open even when the user changes tabs, or otherwise changes focus away from a popup (normal popups automatically close when they loose focus, etc.).

But, basically, the entirety of the extension has to be re-implemented as a completely different user interface, this would likely include large portions of duplicated functionality with Firefox's existing interface. Even then, it would be incomplete, because the WebExtension API has no access to bookmark tags. Of necessity, such an interface would be almost completely separate from the browser UI. The only integration would be that you use the browser UI to open this new UI.

Options for continuing to use ABH2
Your only real options for continuing to use ABH2 are to
  1. stay on Firefox 55, do not upgrade to Firefox 56+, or
  2. switch to using Firefox 52 ESR, which will give you until June 2018.
  3. [/list:o][b]Some possibilities for partial functionality[/b] [list]
  4. File bugs in Bugzilla requesting enhancements to Firefox for the main things you use from ABH2. While it's unlikely that Firefox will incorporate the level of customization which ABH2 permitted, it's not unreasonable for them to add small portions of the functionality (e.g. adding the "Add Bookmark Here" and "Open All in Tabs" entries in the bookmark drop-down menu are reasonable candidates).
  5. Some of the style changes which ABH2 does for the bookmark dialog can probably be implemented through userChrome.css.
  6. For your own personal use, it's also possible to modify the Firefox code, either the code which is compiled into the Firefox executable, or the JavaScript/CSS/HTML/XUL which is contained in the omni.ja files within the Firefox distribution. This is possible, but a pain in the rear. I did it for personal mods, which I eventually turned into a "legacy" extension, as that was about the same amount of work as having to perform the modifications each time Firefox updated.
    To implement this option would require continued development at a somewhat higher level of effort than has been needed in the past, but without the ability to ship the modifications to others as an extension. The current issue of not working with the changes in Firefox 56 would need to be resolved, and then FF57, etc. While possible, This is not
[/list]
@Makyen
Really appreciate your extensive informational post. created a new abh2 bookmark folder I will duplicate in Chrome in case of more Fx dev funny business. Thank You Guy! Jim
It is even harder for the average ape to believe that he has descended from man.
Brummelchen
Posts: 4480
Joined: March 19th, 2005, 10:51 am

Re: [Ext] Add Bookmark Here ²

Post by Brummelchen »

no full quotes please
francwalter
Posts: 23
Joined: January 7th, 2010, 7:52 am

Re: [Ext] Add Bookmark Here ²

Post by francwalter »

Makyen wrote:...switch to using Firefox 52 ESR, which will give you until June 2018...
Thank you very much. That I have done. Firefox 52.4.1 ESR
And after June 2018 I need to look for another browser. I hope that till then there will be any other bookmark service as good as the Firefox bookmarks (with syncable notes and shortcuts etc.).
dougjp
Posts: 53
Joined: September 26th, 2006, 3:21 pm
Location: Ontario, Canada

Re: [Ext] Add Bookmark Here ²

Post by dougjp »

francwalter wrote:
Makyen wrote:...switch to using Firefox 52 ESR, which will give you until June 2018...
Thank you very much. That I have done. Firefox 52.4.1 ESR
And after June 2018 I need to look for another browser. I hope that till then there will be any other bookmark service as good as the Firefox bookmarks (with syncable notes and shortcuts etc.).
Exactly what I did (my profile automatically shifted over without problems by the way - just had to get earlier versions of this and another add-on that had been recently updated). Its a great alternative because it gives lots of time to search for reviews about other browsers, download and test other browsers AND see what people say about the upcoming FF 57 (including what will no doubt be many online reviews of FF 57). This gives Mozilla, and possibly some add-on developers, time to provide a user friendly add-bookmark function that makes sense.

So far I have been very pleased with Opera which actually has (gasp) a logical adding of a new bookmark to my sub folder on my drop down bookmark list and afterward, have it appear on the TOP of said sub folder list! Where I can quickly locate it later! Too complicated an idea for Mozilla to grasp!
User avatar
jamesejohnson
Posts: 16
Joined: July 12th, 2016, 9:44 am

Re: [Ext] Add Bookmark Here ²

Post by jamesejohnson »

Brummelchen wrote:no full quotes please
I assume you mean Long quotes.? Does one have to cut the portions out to eliminate with just the edit feature? Kinda bad type to decipher.
Am more than happy to try a change for the better tho. Jim
It is even harder for the average ape to believe that he has descended from man.
User avatar
jamesejohnson
Posts: 16
Joined: July 12th, 2016, 9:44 am

Re: [Ext] Add Bookmark Here ²

Post by jamesejohnson »

To all you guys.

If you guys could plz explain, where the Fx web site to "switch to using Firefox 52 ESR, which will give you until June 2018." that Makyen kindly provided above? Thkz, Jim
It is even harder for the average ape to believe that he has descended from man.
Makyen
Posts: 16
Joined: June 17th, 2014, 9:18 pm

Re: [Ext] Add Bookmark Here ²

Post by Makyen »

jamesejohnson wrote:If you guys could plz explain, where the Fx web site to "switch to using Firefox 52 ESR, which will give you until June 2018." that Makyen kindly provided above?
After people had posted some replies, I realized that more information was desirable. I updated my message to include:

Options for continuing to use ABH2
Your only real options for continuing to use ABH2 are:
  1. Stay on Firefox 55, do not upgrade to Firefox 56+, or
  2. Switch to using Firefox 52 ESR, which will be supported until 2018-06-26.
User avatar
jamesejohnson
Posts: 16
Joined: July 12th, 2016, 9:44 am

Re: [Ext] Add Bookmark Here ²

Post by jamesejohnson »

@Makyen
Very Cool! Appreciated indeed, Jim
It is even harder for the average ape to believe that he has descended from man.
greatlord
Posts: 13
Joined: February 22nd, 2014, 4:34 am

Re: [Ext] Add Bookmark Here ²

Post by greatlord »

Makyen wrote:[*]Some of the style changes which ABH2 does for the bookmark dialog can probably be implemented through userChrome.css.
Well, that's not ideal. Sucks that they're doing away some of the stuff that made Firefox stand out, but whatever.

As for the userChrome.css edits. I've tried a couple of codes that I've found around. They "expand" every option for adding a bookmark: https://a.uguu.se/0ymekrPRQ0md_2017-10-19_01-20-04.png

But they don't actually show the folders or keywords. Is this a glitch or is the code I'm using wrong? I tried on a clean install of Firefox too.

Code: Select all

#editBookmarkPanel #editBMPanel_rows > row[collapsed="true"] { visibility: visible !important; }
Makyen
Posts: 16
Joined: June 17th, 2014, 9:18 pm

Re: [Ext] Add Bookmark Here ²

Post by Makyen »

greatlord wrote:
Makyen wrote:[*]Some of the style changes which ABH2 does for the bookmark dialog can probably be implemented through userChrome.css.
As for the userChrome.css edits. I've tried a couple of codes that I've found around. They "expand" every option for adding a bookmark: [dead link]

But they don't actually show the folders or keywords. Is this a glitch or is the code I'm using wrong? I tried on a clean install of Firefox too.
The link you provided for your image expired, so I'm not 100% certain what you were referring to. However, I've got a good guess.

The Folders and Tags sections are populated by JavaScript within Firefox (nothing WebExtensions can change). There's nothing you can do in *userChrome.css* to get them to be populated. If you click on the "expand" button once, they will be populated. They will stay with the same display when you re-open the popup. This means that they will most likely be wrong, unless you click on the "expand" button again, each time you open the popup. However, they appear to be usable, even if you don't click on that button.

"Keyword" and "Description":
The "Keyword" and "Description" will not be populated unless you enter something in those fields. These fields are not enabled, nor enable-able, in the normal view. If you do enter something, it will be assigned to the bookmark, in many cases. In other cases, it won't. These inputs do not work reliably. They will contain erroneous information under most conditions. The values you enter may, or may not, be properly recorded. Testing indicated that it will depend on the situation. I recommend against showing the "Keyword" and "Description" fields, as they will not do what you expect them to do in many situations. In my opinion, it's better to not show them and have to enter the information elsewhere than to have them work erroneously.

Folders tree:
The auto-expanded Folders tree mostly worked. However, there were cases where it did not function correctly, and there may be other cases where it does not work as expected. When editing a bookmark, it was sometimes necessary to click on multiple different folders prior to the desired one actually taking effect. If the bookmark is in a location that is not visible (i.e. not int he Bookmark Toolbar), then there is no visual indication that the operation was not as expected. Thus, I would hesitate prior to establishing this as automatically open all the time, as there will be instances where it doesn't work the way you expect.

Tags:
I did not test Tags.

userChrome.css:
If you want to show just the folder tree view and tags selector, you can use:

Code: Select all

#editBMPanel_tagsSelectorRow,
#editBMPanel_folderTreeRow {
	visibility: visible;
}
In the past, I've also adjusted the size of the folder tree:

Code: Select all

#editBMPanel_folderTree    {
    min-width:400px !important; /*Adjust to the width you desire. */
    min-height:500px !important; /*Adjust to the height you desire. */
}
You'll have to choose for yourself if you want these items to be always show, despite the fact that they will show erroneous information, and will result in erroneous operation, under some conditions.
N8uhu
Posts: 2
Joined: September 30th, 2017, 3:33 am

Re: [Ext] Add Bookmark Here ²

Post by N8uhu »

@avada

Thank you very much for your answer - even it is really sad for me.
Denver_80203
Posts: 3
Joined: October 25th, 2017, 4:38 pm

Re: [Ext] Add Bookmark Here ²

Post by Denver_80203 »

I'm way out of my league here but I wonder if it's possible in ff57 to alter the right click menu in the bookmarks. So you might not be able to display the add bookmark here option on the menu itself but, right-click in the desired location and go from there?

Very sad to see this one go... While I could just roll back FF I think the best option is to adapt something new..
avada
Posts: 1932
Joined: February 10th, 2008, 6:30 am
Location: Hungary

Re: [Ext] Add Bookmark Here ²

Post by avada »

Denver_80203 wrote:I'm way out of my league here but I wonder if it's possible in ff57 to alter the right click menu in the bookmarks. So you might not be able to display the add bookmark here option on the menu itself but, right-click in the desired location and go from there?

Very sad to see this one go... While I could just roll back FF I think the best option is to adapt something new..
What's the point in that? You can just go to to the location where you want the new bookmark in the sidebar then just drop the tab there.
Post Reply