House of Hackers

0x000000

Javascript Challenge.

So, I thought it might be interesting in putting up a challenge here.

The contest is very simple: Write a Javascript (for greasemonkey) that blocks:

1. Ning Google ads.
2. Google analytics.

The code must be as small as possible.

I am very interested in your ideas on how to approach this. Maybe you think greasemonkey is not the right tool? maybe you have a better idea? What do you use? prototyping? or plain javascript code? bookmarklet? it's up to you.

In any case, build a tool that blocks all Google content on House of Hackers. Interested? start coding and post your ideas in the comments.

Reply to This

Replies to This Discussion

you beat me to that :) but I had a different idea.

Write a JavaScript code that will prevent ad-jacking attacks (latter at GNUCITIZEN on that). Write a script that disinfects malicious STYLES.

That would be fun!

Reply to This

hehe I always beat you on certain idea fronts eh? ;-) how about putting up that as a second challenge?

Reply to This

I presume people should send their entires under this group and then we comment on them?

Reply to This

Yeah I think so. I am very interested in the different approaches.

Reply to This

true true :)

Reply to This

"ad-jacking" reminds me of something

Reply to This

something like this?

iframe[name="google_ads_frame"]{display:none;}

To be honest, I didn't write this: here is the original one - comes as a greasemonkey script as well. Also, if you are using FF, consider the Adblock Plus addon - works like a charm.

you need to block only show_ads.js and stop worrying about the rest.

Edit: you might also consider the Stylish extension, which allows client-side JS to be executed, and if one might play quite a lot with this, if one is so inclined. Can make your browsing experience much better, especially if you know your way around with JS.

To summarize - I did it with Adblock Plus and a Stylish script. Greasemonkey is also possible, although I don't use this.

Reply to This

Kinda like that, the idea is to come up with a solution of you own, sure it can be a modified script from someone else, but not a (bloated) plugin that exist already. This way, some get to know how these things work, and that a plugin isn't solely necessary since you can DIY.

Reply to This

You might as well argue if you have to compile a kernel yourself just because you can do it..

I agree, for the purpose of the challenge I kind of "cheated".. but then again, I used the same information that you had available - the Internet.. I don't have to discover the wheel every time I need things done - for the sake of being original.

And I did learn something by just messing around with the things already done.

Reply to This

Yes i think you can learn new things while doing it, the purpose is to defeat the ad-serving plus the analytics spying without the need of adblock etc. I'm interested in solutions that are elegant, small or unconventional. I know how to do it, but I want to see others ideas about this.

Just like you submitted the stylish plugin, I never heard of it so I learned something new already to check out. :)

Reply to This

How would you do it? I'm not a JS expert by any means, but I'm always interested in learning from a clever solution.

Reply to This

ning offers "source access" feature, maybe, it's possible to cut off evil on server side.

Reply to This

  • 1
  • 2

RSS

About House of Hackers

© 2008   Created by Petko D. (pdp) Petkov on Ning.   Create your own social network

Report an Issue  |  Feedback  |  Privacy  |  Terms of Service