[Ext] Context Highlight 0.3.1

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
milchschnitte
Posts: 1026
Joined: April 27th, 2004, 5:43 pm

Post by milchschnitte »

as the integration should probably go the other way.
Thanx man, thats what im going to do:)
zizibaloob
Posts: 28
Joined: May 26th, 2004, 11:47 am

Post by zizibaloob »

Just to try my hand at extensions and sidebars, I threw together an extension that does exactly what this one does (same .js file and all), but instead of being run out of the context menu, it's run from a sidebar. My problem is that

Code: Select all

if(!contextHL.currentDocument)
{
   return false;
}

always executes, because for some reason

Code: Select all

contextHL.currentDocument = gContextMenu.target.ownerDocument;

doesn't work. If anyone knows why, please let me know.
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

Probably attributes of gContextMenu only exist when the context menu is active. If you point me to your source I might be able to help.
sasquatch
Posts: 6022
Joined: November 25th, 2003, 8:56 am

Post by sasquatch »

My "context highlight" extension is no longer working with this build:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040706 Firefox/0.9.0+ (bangbang023)
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

Works fine for me with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040706 Firefox/0.9.0+ I don't think I can really help you beyond recommending an uninstall/reinstall. What actually isn't working?
sasquatch
Posts: 6022
Joined: November 25th, 2003, 8:56 am

Post by sasquatch »

Cusser wrote:Works fine for me with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040706 Firefox/0.9.0+ I don't think I can really help you beyond recommending an uninstall/reinstall. What actually isn't working?


My gosh, it now works!!!

Only thing I did was uninstall "Session Saver". While broken, it came up with "highlight word", "highlight phrase", "highlight words", and something else on right click, but none of them did anything (that I could notice). Now it has just "highlight word", and works like it used to.

Odd.
sasquatch
Posts: 6022
Joined: November 25th, 2003, 8:56 am

Post by sasquatch »

Just to be safe, I uninstalled with the intention of reinstalling. Now it won't let me install it (from your link on first page here).

Help!
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

Not sure what's causing that bug... interesting.

1) Did you upgrade your profile from previous builds to cause the breakage?
2) What happens when you try to reinstall?
sasquatch
Posts: 6022
Joined: November 25th, 2003, 8:56 am

Post by sasquatch »

"Context Highlight 0.1 could not be installed because it is not compatible with this version of Firefox. (Context Highlight 0.1 will only work with Firefox versions from 0.8 to 0.9."

After that, all it lets me do is hit "OK" button, end of story.


1. I updated profile recently, but not just before this particular build. I hadn't done a new profile for like 5 months before that and no problems. The prior version I was using was 6/25 I think.

2. Did same thing when trying to reinstall.
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

You need to set the pref "app.version" to 0.9... My extensions (and most others) are not listed as 0.9.0+ compatible (since you can't specify by build dates and I'm not testing every day anyway), so this is the workaround that nightly users will have to live with. If you put it in user.js, it won't affect your build, and you can migrate the profile continuously.
User avatar
ehume
Posts: 6743
Joined: November 17th, 2002, 12:33 pm
Location: Princeton, NJ, USA

Post by ehume »

Cusser

Today's build features a Find toolbar that includes a Hightlight button--it highlights the search term. However, this feature does not replicate your extension, since Context Highlight allows us to select a word in the text and highlight it. Saves typing.
Firefox: Sic transit gloria mundi.
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

Thanks ehume, I'll check it out. I may be able to use the native highlight code to give greater efficiency.
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

Update: I checked out the Find toolbar, I don't think the code is as useful as mine in that it doesn't highlight multiple words individually, rather it always works as a phrase. Instead of using the native code, I'll try and prevent clashes between the two (i.e. using one will clear the other first, in addition to it's own previous highlighting).
zizibaloob
Posts: 28
Joined: May 26th, 2004, 11:47 am

Post by zizibaloob »

Cusser wrote:Probably attributes of gContextMenu only exist when the context menu is active. If you point me to your source I might be able to help.
The source is literally the same as the original. The only difference is that instead of right-clicking and choosing "Highlight Word" or whatever, you just click on a button in the sidebar, and it executes those commands.
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

What I mean is that gContextMenu.target doesn't exist unless you *do* right click.
Post Reply