ID:160846
 
Is there any way to block ads in the byond browser? Trying to make a decent utility but i can't have ads annoying me.
BYOND Browser=Internet Explorer.
Why are you surfing the web in the BYOND browser when you could be using Firefox?
In response to Kaiochao
Kaiochao wrote:
BYOND Browser=Internet Explorer.

But i can't force people to download software to use mah utility now can i? Maybe i'm not asking correctly, i tried going to the adblock plus site and looked around for the source code, and i saw cvs. I'm not into drugstores so i passed on that.
I guess the question i'm trying to ask here is how do people block out ads?, what would the best way disabling javascript alltogether?(that would cause some compatability problems with some sites). Or is there certian things that google does that will block most of there code by filtering out some code?
In response to Tubutas
You don't have to listen to me, but frankly I think you should just stop bothering with this part of your project. Seriously, are you trying to make your own browser? In actuality, whatever the answer is to that, this doesn't really have anything specifically to do with BYOND, but with IE, really. Also, I could be wrong, but I don't think you can mess with IE and then limit that to only taking effect inside your BYOND game. It's going to be 'global-ish', and could only be partially worked around by undoing the mess when the game is closed; either way it's going to get pretty messy...
In response to Kaioken
If you're a BYOND member, just turn off the Ads from your key settings.
In response to Howey
Howey wrote:
If you're a BYOND member, just turn off the Ads from your key settings.

lol, the utility isn't meant for only byond...

I might as well explain it all out to you guys seeing as no one gets it anyhow. In this utility, it checks a website every once and a while it checks for updates, if it has an update, then it notifies me through a sound beep. With this utility i can get the jump on when someone posts in the code problem section or the developer how-tos. its a list so it can do multiple at once. Using it i can also get notified when the my favorite manga chapters are realest. So i don't have to keep checking the website. It works, only problem is that ads change very frequently, and my updater keeps mistaking an add update for an page update. Get it?
I would not recommend this at all, but it's possible, to some degree in DM.

Ad filters just work by looking for scripts, style sheets, and images coming from domains known to put ads on pages (like Google). You could counter this either by inserting some JavaScript/CSS (however, this wouldn't work for your updater scenario) or by removing it completely from the page's source.

You have to grab the source of the page using world/Export, edit it to filter out the ads, then show it to the user using browse, although I would imagine this could be a somewhat slow and inefficient process. You would also have trouble whenever the page was refreshed or the URL changed (via the user clinking a link or otherwise)

I recommend what Kaioken said; It's not really worth writing a utility like this in BYOND.
If you really, really wanted to do this, I'd go about it this way.

1. Grab the source of the initial page you want to load. That is, go in via world.Export() and grab the content from the HTTP response. Look up Export() in the DM Reference.

2. Filter out anything you deem to be an ad. Guess what? You get to write a nifty text-parsing/removal tool!

3. Change all anchors in the page to link locally. That is, instead of having a link point to http://byond.com, have it point to something like byond://?action=browse&url=http://byond.com (I believe topic links begin with byond://? anyway; can't remember exactly). This way, whenever the person clicks a link, instead of the browser jumping to that URL, you can handle the request in the Topic() proc, so that you can start at step 1 for the new page load (send a request for the page source, edit it, display in the browser).

4. Rawr. Display the edited page in the browser control.

It's obviously a lot more work than it's worth, it will be hard to distinguish between ads, necessary JavaScript, and useful content, and really I don't see any point to this, but it seems like the most reasonable way of handling this.
In response to Nickr5
None of you must read manga then am i correct? You don't know the pain of waiting and consistently checking, and the only reason why im doing this in byond is because i feel like sharing it, and i have very little experience outside of it. VB and flash are my only other options and i don't have flash till the end of the summer.
On a side note what would you do it in? Im willing to learn a whole new language.
In response to Tubutas
You'd be better off downloading already existing software that checks for website updates and attempts to bypass ads or allows you to filter them rather than attempting to create your own.

I suppose VB would be good for this, as it's advertised to be excellent for making little tools like these.

I don't see a purpose for your project -- BYOND already has plenty of functionality you can use to check for updates.

For members' pages, you can use RSS feeds. For games and friends, the BYOND Pager can notify you of any changes there.

The only thing I'd possibly see it useful for is the forums, and those only have the sidebar ad which I believe can be hidden. Even then, you've got the option to have BYOND notify you via the pager if a reply has been made to one of your posts on the forums. And given that the forums can change quite a bit in a short timespan you may be spammed with 'update' messages.