NumADD firefox extension fix

Discuss N mapping theory, N maps, and other aspects of map-making.

Moderators: PALEMOON,  yahoozy

The Loneliest Number
Posts: 1
Joined: 2009.06.12 (02:41)

Postby laseredd » 2009.06.12 (02:53)

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.
Attachments
numadd-1.6.1-fx.zip
My fixed version of NumADD
(13.38 KiB) Downloaded 116 times

User avatar
Bayking
Posts: 318
Joined: 2008.09.27 (19:36)

Postby Animator » 2009.06.12 (21:17)

I've been waiting so long for someone to fix this. It's wonderful.
Image

User avatar
Unsavory Conquistador of the Western Front
Posts: 1568
Joined: 2008.09.26 (05:54)
NUMA Profile: http://www.nmaps.net/user/origami_alligator
MBTI Type: ENTP
Location: Portland, Oregon

Postby origami_alligator » 2009.06.27 (05:07)

Did you also happen to make it work for Firefox 3? Last time I checked it wasn't compatible.
Image
.,,,,,@

"Listening intently, the thoughts linger ever vibrant. Imagine knowledge intertwined, nostalgiacally guiding/embracing."
<Kaglaxyclax> >>> southpaw has earned the achievement "Heartbreaker".
Promoted to the rank of Ultimate Four by LittleViking
[15:34] <Brttrx> ADDICTION IS GOOD, MR BAD INFLUENCE
[20:05] <southpaw> 8:05pm, Wednesday, 29 April, 2009, southpaw completed N.
[22:49] <makinero> is it orange-orange-gold yellow gold silverthread forest urban chic orange-gold?



Who is online

Users browsing this forum: No registered users and 11 guests