A quick heads-up for anyone that liked my @xpath* headers proposal a few years ago (https://groups.google.com/d/msg/greasemonkey-dev/zEDG4Ry5L9o/HKbuj2V3jQ0J):
I just reincarnated this idea in a library fashion reusable from any user script type system, in the form of a function on(spec), towards the same end (gist: https://gist.github.com/3886769 -- feel free to fork and tweak at will). A Greasemonkey/dotjs usage example that makes comic strips clickable at sinfest.net: before: http://userscripts.org/scripts/version/4699/26064.user.js/ after: http://userscripts.org/scripts/version/4699/516035.user.js/ This utility might not strictly belong on GM-dev (it's not immediately proposing any core changes), but I figured I'd hail the crowd here that liked my initial variant on the same note, and maybe spur some innovation to improve and iterate on it. There is some potential UX benefit of having Greasemonkey do this content-based filtering instead of script-side code, for purposes of showing a third state for a script in the monkey menu ("script would have run on this page, had the page not been missing these DOM elements: [named list of page elements the script required, that were not present]") – but behind that would be a somewhat large set of core changes, so this isn't on the GM roadmap quite yet, and might never get there either. If you like the direction, though, start using this in your scripts, and/or tweaking it to your preferences so gets to evolve, mature and gain some traction first. If it doesn't, it's rather destined to go nowhere beyond here, however much I personally find it a much better way of writing page-mod type scripts than using the W3C APIs directly. :-) I'm filing my own notes of stuff I want to fix or improve in https://github.com/johan/user.js/issues/ for now, but the greasemonkey-users list is a fair place to chime in thoughts too if anyone feels chatty. I'm intentionally just showing the tip of the iceberg in this post, as I tend to write a little too much in general. Happy hacking! -- / Johan Sundström > -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To view this discussion on the web visit https://groups.google.com/d/msg/greasemonkey-users/-/_QJAO7kR9g8J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
