I see a lot of questions about using different year TJ hardtops on TJ's and how to deal with the wiring differences, so here's some information on how to swap the plugs from one year style to another for maybe $1 a plug with no cutting of wires, splicing or soldering.
Electrically, there are several versions of the hardtop and factory tub wiring. For 97-00, the wiring uses a 10-position plug, and the circuits in the plug include interior lighting. For 01-02, the same 10-position plug was used, but officially the lighting circuit was dropped, so depending on when your Jeep and hardtop went down the assembly line you may or may not have the lighting circuit in the factory plugs. For 03 and later, the factory switched to a 6-position plug, again with no lighting circuit.
Both the later 6-position and early 10-position plugs are from the same manufacturer's plug "family", so if you have a top from a different year than your Jeep you can easily make them compatible by swapping the pins from one style plug housing to the other. No soldering or splicing of wires is required.
Depending on what year you're trying to convert from/to and whether you want to convert the hardtop side or the tub side, you'll need to get the correct plug housings to swap the pins into.
Photo 1: Compatible plugs pulled from other vehicles at the Pick-n-Pull junkyard. At the top is an 03-06 plug, it came from the power seat motor of a Dodge Durango. You'll find it under the seat.
Next, the lime green one, is a 97-02 compatible plug, it came from under the passenger side of the dash of an XJ Cherokee.
The two at the bottom are also 97-02 compatible, they came from under the hood of a Dodge Neon.
My local yard charges about $1 per plug.
Photo 2: Shows the "business ends" of the 10-position plug. On the left is the female side (the tub side) and on the right is the male side (hardtop side). The inside views of the later model 6-position plugs are similar.
Photo 3: Now we'll get down to the business of removing the pins. The first step is to remove the weatherseal retainer. There are two versions of these plugs, with and without the weatherseal. If the plug you've got doesn't have the weatherseal, skip this step and the next one. Pry off the cover with a small screwdriver and slide it along the wires out of the way.
Photo 4: Next, remove the weatherseal with a small screwdriver. Slide it along the wire out of the way as well..
Photo 5: Here's a closeup of the inside of the male plug. Notice this one isn't "fully populated", it only has 9 pins, some of the ones you'll find in other vehicles are like that. No problem, we're only going to use the new housings from the junkyard plugs anway, we're going to insert the factory pins from the hardtop or tub wiring into the new housings).
Photo 6: The pin cap needs to be removed, that's the red plastic part. Using needle-nose pliers, grab the "handle" that sticks out on the cap and pull it out of the housing.
Photo 7: Now the pins can be removed. Before you remove any, you should probably label the wires so you can put them into the new housing in the right locations. You may need three hands, so it's easiest to put the plug in a vise. If you closely inside the plug housing, you'll see a retaining clip that holds the pin in place. In this photo, I've moved the retaining clip so that the pin is no longer held in by the clip.
Photo 8: With the retaining clip held back, just pull the pin out. Should come out very easily.
Photo 9: The steps for the female side are the same - first pull out the blue pin cap with needle-nose pliers.
Photo 10: Similar pin retaining clips will be found inside the female plug, so using a tiny screwdriver push them back and pull out the pins. In this photo I've got a clip pushed back so the pin is ready to be pulled out.
So once you've go the pins out of the factory plug you wish to change, and you've got junkyard housings with pins removed to change to, all you've got to do is insert the pins on the factory wiring into the new housings. This drawing shows the pin locations:
Reassembly is the reverse of disassembly, don't forget to reinstall the pin caps and if your plugs had them, the weather seals.