Comments by Johan Sundström on scripts
229 comments
|
Comment on: |
Your "Breafuios - based on Wiisley's script" script logic seems to bug out for sawmills of level 21; the iteration first goes above the length of the array indices (trying to index undefined with 0); surrounding that part up to the return with a try{ ... }catch(e){} block at least prevents it from killing script execution. Also, the script seems to break on islands you have more than one city on. (Friendly tip: instead of cut&paste:ing the ugly unreadable document.evaluate DOM API code a dozen+ times, |
|
Comment on: |
Added a GM 0.8 compat hack. Dang; we really should get a 0.8.1 release out soon; that stuff shouldn't have to bother people. |
|
Comment on: |
1: Nope.
|
|
Comment on: |
The remotely hosted version hasn't been updated to 0.2.8 in full yet, though Motley fixed the most crucial ones some day or days ago while I've been busy irl, so it already kind of works again. |
|
Comment on: |
Kronos Utils (which this script relies on for the data) is not quite up to speed with 0.2.8 yet, but it got better with some fixes from Motley. |
|
Comment on: |
Thanks for fixing both misfeatures; sloppy of me to miss the * for the group in the @include section. :-) Script properly updated now. |
|
Comment on: |
I'd suggest tagging this script with the "pagination" tag -- which will link to lots of other little microformat producer scripts that add the (You might also want to handle the additional microformat used by this generic unpagination script, though it might not feel worth the work.) |
|
Comment on: |
In part for not knowing about the other one (my search skills also wouldn't have figured out that Autopagerize removed rather than added paging, though) but first and foremost, this was an experimentative study I had been brewing on for a while, in writing generic cooperating user scripts that meet one another over a micro format (stigmergy), augmenting the microformat in different ways. This key bindings script augments the same microformat as the unpaginator, but in a different way: instead of pulling in next page's items into this page, it adds keyboard bindings to scroll to the next item on the current page, so you can move up and down the item list by pressing m / p (rather arbitrarily picked, to sit well with how I read online comics, which uses j, k, l and n for related purposes implemented by same script and another), over and over again. As you'll note, the two scripts run independent of one another, so if you install both, you get both features -- infinite scrolling and keyboard navigation of the items, even to new items that get added as you tap your way through them. The main beauty of all of it is that all three (or more) parts can be maintained, developed, improved, added or removed independently of one another: any scriptwright can add a new site to the system, without communicating with me or anyone else, anyone that has a use for the properties these microformat consumers use can make new scripts using them for whichever purposes, and you don't have to opt in to all features making use of the data, only those you like. (Based on the data items Autopageresize adds, it does not do precision cutting of only the item nodes from the pages it unpaginates, as my variant does, but if all one wants is something to undo pagination that system might be the better pick, given its large user base.) |
|
Comment on: |
@silent_gamer: I think you misinterpreted me there; it was a good question - follow the link for more info on inadvisable ways of conduct that *will* get you banned - and some clear reasoning about how it all works. No derogatory remark intended; sorry if I was overly terse. @camel: Thanks; included in remotely hosted version. (I'll try to get some time to update the version here too at some time.) @daiei27: Sorry; see feedback section above for bug reporting; I don't do bug tracking for this script here. @Nick Rosier: Nope; I was hoping subversion keyword expansion would be performed on google code's svn server, but those unfortunately only work if you check out the code with subversion and install from local files. I think more recent versions have dropped the revision number bit. |
|
Comment on: |
Oh; the version hosted here was actually buggy that way -- thanks for mentioning it. Updated from the repository now. As a side bonus, you can toggle the display on and off now in v11 on the left pillar base. |
|
Comment on: |
If you can stand the tons of other features, I'd recommend using Kronos Utils instead for this purpose -- which keeps different counters for different towns named Polis, for instance (but requires you to read the report once to know which city it was about). |
|
Comment on: |
It's possible that Greasemonkey has UTF-8 issues on win32 Firefoxen, but I only have anecdotal evidence, and haven't dug into it myself, as I don't really have a setup like that at the moment. |
|
Comment on: |
Won't do it in ever-present table form, but may do it in a fashion similar to the click-small-wood-icon view for the city column. Would probably look more like the IK+ building overview than ikariam overview table's take, though. But don't hold your breath; that's a minimum priority feature for me, as I prefer Kronos' take on it. (The revision numbers will probably go away; they apparently don't work when installing from the repository itself; only when you check it out using subversion, and install and update from there.) |
|
Comment on: |
Nope, it's an E4X XML literal. Your Firefox handles that since a few months or years, but no other browsers grok the syntax yet. |
|
Comment on: |
Unlikely, but in case not already known to you, Kronos Utils shows the latter info for the current town of reference in the top portion of the screen where your population indicator is; "202 (1,324:10h)", for instance, means 202 free citizens of 1324 total and that you should start upgrading this town hall within the next ten hours, if you don't want to miss any population growth. A negative time reading, similarly, means that you might want to train some troops, may distribute less wine, or similar, if you don't want to miss population growth time when it does fill up. The Kronos code that calculates that stuff is rather tightly bound to the current city at the moment, and I'm too lazy to do refactor it, for now, so it won't show up in the table overview anytime soon. |
|
Comment on: |
Pax0707: Nah; I'm settling for the subset I liked myself, plus the additions I missed in that one. la faucille: Unlikely; that was the kind of bloat I did not like in Andras Suller's version (which he gracefully let us who didn't like it disable -- I'm sure you could run that one with only those bits turned on if you liked them). ordan: Now the initial plans have all been fulfilled, including that one. |
|
Comment on: |
It didn't handle auto-updating Really Old Kronos Utils versions. Now it probably does. It also sports a military units table now, which hopefully works fairly well. |
|
Comment on: |
A less featureful but likely also less prone to breakage script doing similar things with a bit more elegance is available here: http://userscripts.org/scripts/show/30750 |
|
Comment on: |
Okay; I've finally made my own variant of this script's table, Kronos Overview. It isn't as full of options and features as this hack, and it never will be either, but it won't break as often under ikariam layout changes as this one does. |
|
Comment on: |
@silent_gamer: Yes. In particular, if you are unintelligent about it. In practice, it will not happen unless you cause Gameforge grief, costs or trouble over it. (I am well known in that community as the script's maintainer, yet have not been banned over it yet.) |
|
Comment on: |
Ah! Glad to see you back again -- we have missed you. :-) |
|
Comment on: |
Advice to whomever might fix this next time: Instead of the brittle XPath expression to look up the name of the current building, use the value of
This works stably across any page layout changes Gameforge ever does, and is what Kronos Utils does without ever encountering any trouble (track record back to 0.1.8, or thereabouts, when I think I started hacking on Kronos). |
|
Comment on: |
I think the site css changed after your script was created; I made one of my own here, adding a spacer between pages too. (And if you're avoiding @require to let GM 0.7 users run the script too, I wouldn't bother now that GM 0.8 has gone public.) |
|
Comment on: |
Fun, isn't it? :-) |
|
Comment on: |
For it to do anything, one needs to read, understand and follow the docs above; all four sentences of it. |
