Thursday, February 28, 2008

Apple #301: Adbaaz crap

I just got the word that a lot of you have been getting redirected by some sort of hijacking code to something called adbaaz.com. I have looked into it and according to my tests, the problem has been fixed. But if anybody still experiences any weirdness, let me know.

Here's what was going on.

Apparently, this lovely little gem finds javascript code that has been written into the templates of various blogs and websites. It corrupts that code so that, instead of running its usual javascript happiness, it instead redirects people to this stupid and useless web page.

If you are a blogger or a web page author, to make it stop, you have to figure out which javascript code in your template it has corrupted. That can be a tricky proposition.
  • Some people have addressed the problem by deleting all javascript code from their templates. To me, that's a slash & burn approach that didn't seem necessary.
  • When the adbaaz was working its idiocy on my site, the username for my Sitemeter statistics was appearing in the redirected url and at the top of the page where it sent me. So I figured it was the code for Sitemeter that it had corrupted.

A screen shot of what adbaaz did to someone else's page. See the Websourcedtraffic.com up in the left corner? I'm willing to bet that's the code that adbaaz corrupted.
(screen shot from dudesdoingdotnet's blog)


  • So I deleted the page element widget for Sitemeter from my Blogger template. I then re-loaded the Daily Apple, and adbaaz did not work its stupid magic and the Daily Apple stayed loaded. The case, as Inspector Clouseau would say, was solv-ed. Mostly.
  • I was going to add a new page element and simply paste the Sitemeter code back in, but that option to Add a Page Element wasn't appearing. I checked Blogger's Help pages for suggestions, and it said the absent Add a Page Element option was a known issue.



To add widgets for javascript and other things you want to put into your frames, go to Layout and choose Page Elements, and click Add a Page Element. In my case, that link to Add a Page Element was missing.

      • The reason Add a Page Element wasn't there, Blogger help said, might be because the URL was using a www2 instead of just a www, and deleting the 2 would take care of it. That wasn't what was going on in my case.
      • The other reason, said Blogger help, was that some javascript had been entered directly into the template, and that it should be removed from the template and placed into a page element.
  • Well, if I couldn't add a page element, how was I supposed to move the javascript into it? (grumble, grumble)
  • I thought I'd try to cheat the thing, and I copied my javascript code for Sitemeter into the end of my template. But Blogger wouldn't allow me to save those changes.


To edit the HTML code for your template in Blogger, go to Layout and click HTML. I scrolled all the way to the bottom and pasted the Sitemeter javascript at the end, but Blogger wouldn't allow me to save the template when I did this.

  • So I deleted the code I had just pasted in there and navigated away without re-saving the template. Strangely enough, when I went back to the layout page, it was now giving me the option to add a page element.
  • So I added a page element, pasted in the Sitemeter javascript code, saved the changes, and checked the results. No more adbaaz.

If you are a web page viewer
and you're getting the adbaaz effect when you try to view this or any other page, I highly recommend a particular plugin. It was developed for Firefox (obviously, I therefore recommend Firefox), but if you don't use Firefox, a similar option might have been developed for other browsers.
  • The plugin is called NoScript. It keeps things exactly like this pestilential adbaaz from hijacking any javascript code and doing things with it that you don't want it to. Because I'm using NoScript, I was not aware that adbaaz suppressing my Daily Apple. But when I turned it off, then I saw it at work (in all its pointless splendor).
  • The only downside to NoScript is that it works a little too well. It automatically blocks things like YouTube and Adobe PDFs. But it puts a little S in a circle in the bottom corner of the browser, and by clicking on that S, you can access a pop-up window that allows you to permit the various javascript items to work. So you could tell NoScript to always allow YouTube, for example, or each time you go to a YouTubey page, you could tell it to allow that page in that instance.
  • Even so, get the NoScript if you can. It helps.
Now, no thanks to adbaaz, you can get back to enjoying the Daily Apple and reading all about crayons and other goodies.

No comments:

Post a Comment

If you're a spammer, there's no point posting a comment. It will automatically get filtered out or deleted. Comments from real people, however, are always very welcome!