I recall reading a more detailed account, and the last one is wrong. He later admitted that he was using stock hardware. His secret was in the fact that he had very well trained AA battery teams, who followed strict discipline when it came to things like time for which fire control radar would illuminate the target and had very high morale as they were the most successful AA team in the entire nation.
The biggest problem for Serbs was the sheer volume of strike craft and the fact that you couldn't paint anything without being quickly targeted and destroyed by the plane itself or its allies because of it. Dani's people were trained to illuminate the target only for 20 seconds at a time and then shut the radar down and rapidly relocate no matter what. That meant that HARM based counter-strikes that killed so much AA hardware were ineffective against his batteries. It also meant that his people quickly understood that they weren't being under severe threat of getting randomly killed by air fired missile, which created significant amount of morale and bravery needed to put your neck out to spot, identify, target, paint and shoot at numerous aircraft that all really hate you, want to kill you and have weapons that are specifically designed to kill you.
That got US pilots in the area used to the fact that they were only in danger for ~17 seconds. His shoot down of F-16 later on involved him breaking his own rule and telling the fire control people to keep the radar illuminating the aircraft, pilot of which expected to just jam off the missile once more powerful radar on the ground would turn off and decided to take a HARM shot to see if he could score a kill. He didn't and plane got shot down
I recall similar thing was done to F-117, in that it was killed in a very specific window during which it could be tracked accurately enough for missile to stand a good chance of actually hitting the aircraft. I recall that he said he used a moment when F-117 opened it's bomb bay to get a tentative radar return that this is indeed his target, and then he just directed his powerful fire control radar to illuminate the spot with as much energy as it could pump. You can be stealthy enough to prevent a weapons grade lock on from fire control radar, but when you get bombarded by a fire control radar that already knows where you are because you flashed yourself for it to low quality lock on because spotters took their time to analyze the tactics used and know where to look, missile's logic has a good chance of estimating the range correctly and detonating close enough to kill the aircraft when aircraft is as slow and unmaneveurable as F-117.
According to the leaks, for F-35 the moment when it's "low observable" rather than "stealth" is pretty much any time it's above and ahead of ground radar. It's stealthiness is mainly in the front hemisphere of the aircraft, and rear is far less stealthy. Which means that if it runs into a well trained team like one that Dani led, it's going to have a decent chance to get killed in a similar fashion. And that's when it's in the stealth configuration, which can carry almost no payload. When carrying a proper strike package, it's about as stealthy as most aircraft around, simply because of signal returns from the payload itself.