How I got LongURL Mobile Expander 2.0.0 to Show Tooltips Again.

After updating to LongURL Mobile Expander v2.0.0 it stopped showing Tooltips with the destination when I would move the mouse over a short URL. I would also get “current domain is NULL” errors when browsing locally (I have a local copy of Apache installed for development). The problem existed in both Firefox 3.0.11 and 3.5.

I got it working after seeing a comment here: https://addons.mozilla.org/en-US/firefox/addon/8636 so all the credit goes to Matthias Jansen.

Edit the file: C:\Documents and Settings\(user)\Application Data\Mozilla\Firefox\Profiles\(your profile)\extensions\{a7101e54-830c-4d33-a3ed-bedc17ec44da}\content\longurlmobileexpander.js

I am using Windows XP so your location might be different.

Around line 79, change

var current_domain = document.location.href.match(/^https?:\/\/(?:www\.)?([^\.]+\.[^\/]+)/i);

To:

var current_domain = document.location.href.match(/^https?:\/\/(?:www\.)?([^\.]+(\.[^\/]+)?)/i);

Update: I’ve been told here that the following change is also needed. Around line 89, change

if ((domain !== current_domain[1]) && (typeof(this.known_services[domain]) !== 'undefined')) {

To:

if ((current_domain != null) && (domain !== current_domain[1]) && (typeof(this.known_services[domain]) !== 'undefined')) {

After doing this and re-enabling the extension.. it started working. I can now see the tooltip pop-ups and it’s supposed to fix the current_domain is null problem. Hopefully this will help anyone else that ran into this issue. :)

3 thoughts on “How I got LongURL Mobile Expander 2.0.0 to Show Tooltips Again.

  1. Elizabeth

    Thank you so much! Local browsing with FF was giving me a popup ‘current domain is null’ error in wordpress that was about to drive me nuts. The line 79 fix resolved it.

    Thanks again!
    Elizabeth

    Reply
  2. Jake

    first i changed line 70-ish but i still got null domain error (i’m just looking at local files) so i changed line 80-ish and all is well.
    thanks!

    Reply