Bug fix for ff20/21

527 views
Skip to first unread message

Alan Stewart

unread,
Jun 12, 2013, 7:25:40 PM6/12/13
to wiki...@googlegroups.com
With ff21, I get a syntax error in the error console, that stops wikilook 2.7.0 from finishing loading.

In the file chrome/wikilook/content/wikilook.js line 4746 is not valid syntax in the newer javascript engine:

  globalPackageWL.WikiLook_Overlay.PMaker.WLWTajaxCallbackImpl(res.expandtemplates.*);

Changing that line to an alternate equivalent syntax:

  globalPackageWL.WikiLook_Overlay.PMaker.WLWTajaxCallbackImpl(res.expandtemplates['*']);

works for me - all of wikilook is functional with ff21.

Contrary to what has been mentioned, I don't see where wikilook is using the deprecated E2X syntax.
In any case, that wouldn't require a complete re-write.

Alan

Alan Stewart

unread,
Jun 12, 2013, 7:29:05 PM6/12/13
to wiki...@googlegroups.com
.... E4X syntax.

Heribert Slama

unread,
Jun 13, 2013, 4:42:04 PM6/13/13
to wiki...@googlegroups.com
Your code change ...


On Thursday, June 13, 2013 1:25:40 AM UTC+2, Alan Stewart wrote:
In the file chrome/wikilook/content/wikilook.js line 4746 is not valid syntax in the newer javascript engine:

  globalPackageWL.WikiLook_Overlay.PMaker.WLWTajaxCallbackImpl(res.expandtemplates.*);

Changing that line to an alternate equivalent syntax:

  globalPackageWL.WikiLook_Overlay.PMaker.WLWTajaxCallbackImpl(res.expandtemplates['*']);

works for me, too. Thank you!

maximil...@gmail.com

unread,
Jun 20, 2013, 11:42:44 AM6/20/13
to wiki...@googlegroups.com
Sorry for my ignorance, but how do I change this line? I mean, do I have to find it within the error console? And if so, how do I get the error to show up? I've never dealt with this aspect of Firefox, sorry :(

Heribert Slama

unread,
Jun 20, 2013, 3:46:38 PM6/20/13
to wiki...@googlegroups.com
You don't need to look into the error console - it would only show the syntax error mentioned by Alan with the same relative (i.e. incomplete) file name and line number.

To get the full file name, you have to know the path to Firefox's profile. Do this:
  1. Enter this special URL in the address line: about:support - You'll get a page with title "Troubleshooting Information".
  2. In the top third you find a table with "Application Basics"; it contains a row "Profile folder" with a button labeled "Show Folder". Press the button.
  3. An Explorer window will open showing the location and the contents of your profile. Now you'll have to navigate through several levels of sub-directories...
  4. Open folders extensions, then wikilook@testpilot. You are now on the level Alan was when he said "In the file chrome/wikilook/content/wikilook.js line 4746 is not valid syntax".
  5. Dive down through folders chrome -> wikilook -> content. Now you can see file wikilook.js. Select it (don't execute). Terminate Firefox before you edit this file.

Editing wikilook.js may be a problem for the inexperienced user. There are 2 options:

  1. Use a good editor (as I did) which can handle Unix line-breaks (Windows' Notepad cannot, see below). You can drag & drop the file into the editor's window (if that doesn't work, you now know the full path of the file anyway). Then go to line 4746 (or do the search shown below) and apply Alan's change.
  2. If you have no other editor than Windows' Notepad, do the following: Right-click at wikilook.js and select edit from the menu (not open, don't double-click). This will load the file into the Notepad editor. Bad surprise: the whole text is shown as one huge continuous line! But you're not lost. Just search (Ctrl+F) for res.expandtemplates.* and apply the change. (res.expandtemplates.* => res.expandtemplates['*'])

HTH

Heribert

Alan Stewart

unread,
Jun 21, 2013, 10:08:48 PM6/21/13
to wiki...@googlegroups.com


On Thursday, June 20, 2013 12:46:38 PM UTC-7, Heribert Slama wrote:
Open folders extensions, then wikilook@testpilot. You are now on the level Alan was when he said "In the file chrome/wikilook/content/wikilook.js line 4746 is not valid syntax".

That works if your OS is set to treat zip files as folders. wiki...@testpilot.xpi is the file and an .xpi file is really a .zip file. Otherwise, you will need to unzip the .xpi to a temp folder, edit the file, re-zip all the files, rename the .zip to .xpi, and copy it back to the extensions folder.

Let us know if that's still too geeky...

Alan

maximil...@gmail.com

unread,
Jun 22, 2013, 12:06:13 PM6/22/13
to wiki...@googlegroups.com
Thank you both, Alan and Heribert, for all the instructions!

It feels wonderful to have Wikilook up and running one more time after just one tiny modification. Thanks once more for sharing the solution!!

Heribert Slama

unread,
Jun 22, 2013, 3:00:18 PM6/22/13
to wiki...@googlegroups.com


On Saturday, June 22, 2013 4:08:48 AM UTC+2, Alan Stewart wrote:

That works if your OS is set to treat zip files as folders. wiki...@testpilot.xpi is the file and an .xpi file is really a .zip file. Otherwise, you will need to unzip the .xpi to a temp folder, edit the file, re-zip all the files, rename the .zip to .xpi, and copy it back to the extensions folder.


Very funny, on my computer (Windows Home Premium 7 64-bit) wikilook@testpilot is a sub-directory of the extensions directory, not an .xpi file (and there is no wiki...@testpilot.xpi file around). Obviously many extensions were installed into their own directory.

But I must concede there are other extensions that do reside in .xpi files in the extensions folder; all locations are listed in the extensions.ini file (profile folder), where even the .xpi files are subsumed under section [ExtensionDirs].

Windows Explorer does not recognize .xpi files as zip-folders. They would have to be unzipped and re-zipped with a separate utility. My file manager, Total Commander, can treat several types of packed files as directories, even if their file type is not the usual one. So .xpi files would not be problem for me.

Have a nice weekend,

Heribert

Alan Stewart

unread,
Jun 22, 2013, 9:23:04 PM6/22/13
to wiki...@googlegroups.com


On Saturday, June 22, 2013 12:00:18 PM UTC-7, Heribert Slama wrote:

Very funny, on my computer (Windows Home Premium 7 64-bit) wikilook@testpilot is a sub-directory of the extensions directory, not an .xpi file (and there is no wiki...@testpilot.xpi file around). Obviously many extensions were installed into their own directory.

But I must concede there are other extensions that do reside in .xpi files in the extensions folder; all locations are listed in the extensions.ini file (profile folder), where even the .xpi files are subsumed under section [ExtensionDirs].



Long ago, all extensions created directories from unzipped installed .xpi files. Then firefox changed to just adding the .xpi file. The difference between your directory and my .xpi is probably a function of when we did the very "first" install of wikilook. I have uninstalled and re-installed several times and my current install happened under a recent version of firefox. I didn't know, but I'm guessing that firefox stays with directories if it's updating one that has a directory.

Alan

Alan Stewart

unread,
Aug 16, 2013, 9:42:44 PM8/16/13
to wiki...@googlegroups.com


On Wednesday, June 12, 2013 4:25:40 PM UTC-7, Alan Stewart wrote:
works for me - all of wikilook is functional with ff21.


Still works for ff23.
 

Howard Thompson

unread,
Oct 22, 2013, 3:08:28 AM10/22/13
to wiki...@googlegroups.com
Dude, you rock. Glad to see this little bugger back in action.

Working for me in FF v24.0.

nosauce

unread,
Dec 3, 2013, 3:45:12 PM12/3/13
to wiki...@googlegroups.com
been using wikilooks thanks to this fix. i miss the days when everything worked perfect (even pronunciation!).

Are you all not having the problem of the popup windows appearing offscreen. I usually to scroll down and sometimes to the right to see the popup. Looks like others have the same problem:

https://groups.google.com/forum/#!topic/wikilook/qrBXDZrJhYM

If anyone has any insight into what's causing this problem (if you're experiencing the same) please let me know. Anyone know how to customize where the popup appears?

I do use the nosquint add on (automatically zooms in) and have the pixel setting so that things appear larger on higher res screens. Could it have something to do with this?

Thanks ahead of time.

nosauce

unread,
Dec 3, 2013, 3:49:31 PM12/3/13
to wiki...@googlegroups.com
just to elaborate on the problem. the popups appear perfect when at 100% zoom but I usually have it on ~130% zoom depending on the webpage and the more it is zoomed the more to the bottom right it goes. sometimes it's way down there and sometimes I can't get to it (or by time i get to it, something I did made the popup disappear). conversely when the zoom is <100% then the popup appears slightly to the top left of where the cursor is.

Michael@Oz

unread,
Dec 3, 2013, 8:59:52 PM12/3/13
to wiki...@googlegroups.com
The top/left corner always appears just next to the mouse pointer, so if you click near the right margin the rest of the box will go off screen.
Do you know you can drag the box to where you want it? Just don't click on any of the links.

Michael@Oz

unread,
Dec 3, 2013, 9:03:43 PM12/3/13
to wiki...@googlegroups.com
Oh, I forgot to mention, the add-on just knows about the page, so if you zoom, thereby placing more of the page outside the visible screen, it has no idea.
Reply all
Reply to author
Forward
0 new messages