originally posted in:BungieNetPlatform
View Entire Topic
This is an example userscript for other developers to show how to script Bungie.next. Others are welcome to download/install it. The script performs the following:
- Highlights posts with a rating > 50
- Places a red "@OP" marker beside each of the OP's posts within a topic
- Recolours the posts of Bungie Employees and Forum Ninjas to their old colours
- Displays topic information when mousing over a topic's title in the forum
- Displays extra information when mousing over a topic's last post/timestamp in the forum
- Highlights topics with a rating > 50
- Colours employee/ninja topic titles
- Modifies the notification readout to show who liked/replied to your post
Note the way in which the broker/s dispatch events to those functions which have been defined.
[b]NOTE:[/b] because of the restrictions Chrome places on extensions and scripts, this WILL NOT work in Chrome.
-
Edited by Avants Garde: 4/29/2013 7:20:04 PMCouldn't you have a function that was a prototype member or a standalone that basically patched in your function and then passed the call to the original function? [url=http://en.wikipedia.org/wiki/Don't_repeat_yourself]DRY. DRY. DRY.[/url] So much easier to read. To be honest this looks like a lot of OOP-bloat. Ex: fn(a, b) -> { return fn() { a(args, onerr, fn(result) { b(result); }); } }; fn(bnet.serviceFn, myFn); Something like that. Then either a.patch(b) or a = patch(a, b); Does this do anything on load in general? Because I've figured out how to script an onload event very very easily, and it works on every page.