Page 1 of 1

NumADD firefox extension fix

Posted: 2009.06.12 (02:53)
by laseredd
I don't know if anyone else has fixed it already, but since the recent minor domain name change with 'nmaps.net' to 'www.nmaps.net', the NumADD firefox extension stopped working correctly.

I explored the code of the extension and discovered the problem, in the file /chrome/content/numadd.js it had:

Code: Select all

		// Check the active tab is an N map
		if (content.document.location.hostname != "nmaps.net"
				|| content.document.title.indexOf("N Map") == -1) {
				
			numaddPrompts.alert(null, "numADD", "This is not an N map.") ;
			return ;
		}
because of the recent change to 'www.nmaps.net', this caused NumADD to be unable to detect a correct N Map page. My fix was just to simply change the code to:

Code: Select all

		// Check the active tab is an N map
		if (content.document.location.hostname != "www.nmaps.net"
				|| content.document.title.indexOf("N Map") == -1) {
				
			numaddPrompts.alert(null, "numADD", "This is not an N map.") ;
			return ;
		}
I've attached my fixed version to this post. To use it, rename the file extension from '.zip' to '.xpi', the file extension for Firefox extensions. Once you've renamed it to '.xpi', just drag it onto Firefox and it'll prompt you to install it.

I tried to contact the creator of numADD, but I couldn't find his email address.

6000th post in N Mapping!

Posted: 2009.06.12 (21:17)
by Animator
I've been waiting so long for someone to fix this. It's wonderful.

Re: NumADD firefox extension fix

Posted: 2009.06.27 (05:07)
by origami_alligator
Did you also happen to make it work for Firefox 3? Last time I checked it wasn't compatible.