Meta Question

elliottcable's avatar

Can anybody write a GreaseMonkey script for Fluther?

Asked by elliottcable (141points) July 11th, 2007

I got a good start (or maybe a bad start, I don't know) going here:
http://attachr.com/8708
But I have no idea how to go about debugging javascript, especially greasemonkey/creammonkey scripts. Anybody want to fix it up and publish it as their own?
(Most of the code above unabashadly stolen from Flickr Buddy Icon Reply )

Observing members: 0 Composing members: 0

9 Answers

elliottcable's avatar

Sorry, I forgot to specify what I was trying to do - it's supposed to add a link to the quip bar below every comment to reply to that user by name. Didn't quite work.

andrew's avatar

Elliot... try dl'ing firebug for FF, you can place breakpoints in your JS files.

I'd also suggest that instead of » maybe use twitter-style @username since that's turning out to be the style here.

What's the wrong behavior in the script? I can debug it for you, but I don't have greasemonkey so I can't easily test the behavior.

Also, if you want, since we use the YUI framework you can probably call YUI dom constructors rather than raw DOM code. Reference for that is at http://developer.yahoo.com/yui/

elliottcable's avatar

[andrew] - I wanted to try to define a different standard here before the ubiquitous and horrible @name system took over. For one thing, from a UI standard, the whole internet communications framework already has built subconscious undertones of username@host for almost everything. Having a username AFTER the @ symbol, and moreover, nothing before it, is quite confusing. ? doesn't show up in fluther, but were it to do so, it makes a lot more sense (even though it's improperly using a guillemet, which pisses some other pedantic people like me off. If I can get the script working (I don't write JavaScript, though I've been meaning to learn, all I did was some horrible hackage on the Flickr script) I'll fiddle with the name format until I can get something that pleases me and everybody else - maybe as simple as what I used at the top of this post; the link itself hilights the text with color and that may be enough in and of itself.

andrew's avatar

I see... so it's all about subverting the system, eh? (you're right, unicode is broken on the site right now... one of the many things we're trying to improve...). In the meantime... you can use "»" to display ».

andrew's avatar

Got it... your xpath was off. Change that line to

document.evaluate("//div[@id='quiplist']/div", \
document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);

andrew's avatar

I'd also suggest dpaste.com for code pastes... the line numbers were off in attachr.

Perchik's avatar

From an average user standpoint, I like using @username.

It's saying you're referring at that person. I think its better than the annoying "quoted" text in forums. I'm not familiar with greasemonkey, but it seems to me that you should write some kind of workaround since the @username has become standard.

peggylou's avatar

I sure wish I knew what you all were talking about! Then I'd be so smart!

THiC's avatar

I am so smart! I am so smart! S M R T.

Answer this question

Login

or

Join

to answer.
Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther