The recent combatfilter script for the CAB got me to actually write and submit a script for you guys :|
Basically, it introduces replacements for visit_url (the 0-argument version), write, and writeln: get_page(), write_page(string), writeln(string). It also introduces finish_page(), which should be called after you've finished calling all the other scripts.
I've also included a piece of sample code composing BatMan Relay with kolcombatfilter. Note: composing these two particular scripts was a bit more involved than I'd hoped, mostly because there were a number of namespace collisions.
A few comments for script authors. Please avoid polluting the global namespace with generic variable names like "results" (and functions called whatever. If you want, you can just stick everything* inside main(), or you can prefix your script's exported functions with "scriptname_"). Please avoid relying too much on the structure of the HTML, since that can potentially change (this manifested with BatMan relay rewriting the head and appending jQuery at the end, so the order of the calls to the main functions actually matters
--- I'd suggest putting only dependencies like jQuery in the head). Please don't mangle the HTML more than necessary.
* well, mostly everything --- I think it's just combat filters that need to be top-level code.
danke!
(I'd include a screenshot, but I really should have gone to sleep hours ago.)
Instructions for use: install all the files associated with BatMan Relay and kolcombatfilter in the proper directories (clobbering fight.ash as you see fit), then stick fight.ash in your relay/ directory (clobbering fight.ash again) and the other scripts wherever you want (probably scripts/, although I have most of them in relay/. Doesn't make much of a difference, really).
aside: I don't really like that integration requires a custom fight.ash (and renaming of the existing fight.ash files) -- it's not the most inviting interface, especially to people who just want to download files without needing to bust out the ol' text editor to get everything _just_ right. It's still better than trying to merge the two scripts (although to be fair, the vast majority of kolcombatfilter is in the js file, not ASH
) and maintaining a separate fork.
also, vision: relay overrides in the future look something like this:
happy hacking!
Basically, it introduces replacements for visit_url (the 0-argument version), write, and writeln: get_page(), write_page(string), writeln(string). It also introduces finish_page(), which should be called after you've finished calling all the other scripts.
I've also included a piece of sample code composing BatMan Relay with kolcombatfilter. Note: composing these two particular scripts was a bit more involved than I'd hoped, mostly because there were a number of namespace collisions.
A few comments for script authors. Please avoid polluting the global namespace with generic variable names like "results" (and functions called whatever. If you want, you can just stick everything* inside main(), or you can prefix your script's exported functions with "scriptname_"). Please avoid relying too much on the structure of the HTML, since that can potentially change (this manifested with BatMan relay rewriting the head and appending jQuery at the end, so the order of the calls to the main functions actually matters

* well, mostly everything --- I think it's just combat filters that need to be top-level code.
danke!
(I'd include a screenshot, but I really should have gone to sleep hours ago.)
Instructions for use: install all the files associated with BatMan Relay and kolcombatfilter in the proper directories (clobbering fight.ash as you see fit), then stick fight.ash in your relay/ directory (clobbering fight.ash again) and the other scripts wherever you want (probably scripts/, although I have most of them in relay/. Doesn't make much of a difference, really).
aside: I don't really like that integration requires a custom fight.ash (and renaming of the existing fight.ash files) -- it's not the most inviting interface, especially to people who just want to download files without needing to bust out the ol' text editor to get everything _just_ right. It's still better than trying to merge the two scripts (although to be fair, the vast majority of kolcombatfilter is in the js file, not ASH

also, vision: relay overrides in the future look something like this:
Code:
import <mix_relays>
void alternateScriptName()
{
... stuff
}
void main()
{
alternateScriptName();
finish_page();
}
happy hacking!