Page 1 of 1

BOB lite on other browsers? (Discontinued)

PostPosted: Thu Oct 01, 2009 6:10 am
by sherkaner
One of the annoying things about getting BOB to work in other browsers is that you don't have all greasemonkey-functionality (greasemetal for chrome has its flaws, as does greasemonkey for IE and greasekit for safari. Opera has some own mechanism)

One solution is to create a BOB lite, which basically is a javascript-file without references to greasemonkey-functions that has to be loaded once you are on a game page.

Well, if you know what you're doing, this script has the basic things of BOB included: http://userscripts.org/scripts/source/58895.user.js
(Basic things: Map inspect, extended statistics, dropdown coloring. Snapshots are simply impossible, storing options will be quite hard).

For testing purposes, it's possible to manually load it from a bookmark (also known as scriptlet). I used this to test it in Chrome, firefox and IE 8 (IE looks are different, but it's probably not possible to do it any other way). The usual way: create a new bookmark, give it a name and for location/URL, use the following javascript:
javascript:(function(){BOBjs=document.createElement('SCRIPT');BOBjs.type='text/javascript';BOBjs.src='http://userscripts.org/scripts/source/58895.user.js';document.getElementsByTagName('head')[0].appendChild(BOBjs);})();

If you are at a game page and want to see the stats/map inspect, press the bookmark. BOB will try to load.
(This should actually work for the iPhone btw, but I haven't tested that myself).

Re: BOB lite on other browsers?

PostPosted: Thu Oct 01, 2009 4:00 pm
by Dako
That is actually great.

But how about storing snapshots in cookies? Since it is dangerous to write into files (and not all browsers will allow it) but cookies can be extended to store snapshot data, I guess.

Have you tried that?

Re: BOB lite on other browsers?

PostPosted: Thu Oct 01, 2009 4:36 pm
by sherkaner
Ah, thanks for the feedback.
Cookies might work, though they have a max size (2k if I remember correctly). I'd have to check whether some maps (Conquer Man for example) would use more space per snapshot, and deleting cookies (adware removers?) would remove the snapshots.
Just storing the settings in a single cookie will be hard enough to implement/explain I guess.

Re: BOB lite on other browsers?

PostPosted: Thu Oct 01, 2009 4:43 pm
by Dako
4K for each cookie.

Also, if you remove your cookie with some addon - well, it's your problems, add CC to exceptions and move on.

Re: BOB lite on other browsers?

PostPosted: Thu Oct 01, 2009 6:29 pm
by neanderpaul14
Would BOB lite have fewer calories or less alcohol then normal BOB? :P :P :P

Re: BOB lite on other browsers?

PostPosted: Sun May 16, 2010 4:48 am
by Dai_atan
did what you said, added it made a bookmark, clicked it in a game and now it is stuck on the loading screen... "Initializing BOB"
:( Help?

Re: BOB lite on other browsers?

PostPosted: Sun May 16, 2010 5:21 am
by sherkaner
Which browser was that? This was just a test, keeping 2 seperate scripts upgraded was just too much work (especially since hardly anyone tried this).

So I'm not supporting IE in any way, for chrome the beta kinda works: http://userscripts.org/scripts/show/52700 (snapshots and actually refreshing the content (stats) doesn't work yet, but if you reload you have the right stats, map inspect etc.).