Shaun Johnston


First Stab at a Greasemonkey Script

Following in the footsteps of Dave Pearson ( RB Profile Here ), I have produced my own Greasemonkey hack attempt.

This script implements a visual Textile helper called markItUp on the RedBubble site, and places the helper above all textareas.

Screenshot of markItUp in action on RedBubble


Installation

If you are interested in trying the script, you need to be running Firefox for starters, and you need to install the Greasemonkey addon . Once you have done this, you can fetch the Greasemonkey script from here .

If you do try it, please be sure to notify me of any bugs you find.


History

0.2 Now uses unpacked jQuery code for compatibility with FF2
0.1 First Release

  • Dave Pearson

    Dave Pearsonbeta tester

    Oh nice! I’ve been toying with the idea of something like that for a while now but never got around to it.

    Excellent!

    BTW, any chance of you adding a record of it to this forum?

  • Shaun Johnston replied

    Done :) ... and … first bug! It formats very badly when replying to comments ;)

  • Tania Rose

    Tania Rose

    Just new to Firefox, i’ve never used add-ons before. How handy is it to use Greasemonkey?

  • Shaun Johnston replied

    Hi Tania,

    Greasemonkey can be very handy depending what you’re trying to do. I have a friend who has automated a lot of stuff from internet banking to collating news feeds using it.

    Until now I’ve only used it occasionally, mostly using pre-written scripts to do interesting things on Flickr (one tool I have allows me to click a link when replying to a comment on flickr, to insert the avatar of that person in my comment).

  • Dave Pearson

    Dave Pearsonbeta tester

    First tech support request:

    I’ve installed it, but I’m not getting the intended effect on any textarea (like, for example, I’m not seeing it while editing this).

    Firefox 2.0.0.16

    I do see this in the error console:

    Error: c.type has no properties
    Source File: file:///C:/Documents%20and%20Settings/.../components/greasemonkey.js
    Line: 389

  • Shaun Johnston replied

    Taking a look now Dave. I’m using Firefox 3.0.1 with the latest Greasemonkey (v0.8.20080609.0). Do you know which version of Greasemonkey you’re using?

  • Shelley Heath

    Shelley Heathcommunity host

    Just new to Firefox, i’ve never used add-ons before. How handy is it to use Greasemonkey?

    It is easy once you have downloaded it and installed and installed what scripts you want you don’t have to do anything with it. It is only for the techie types that write these hacks that need to have the knowledge… for the user basically no knowledge required.

  • Shelley Heath

    Shelley Heathcommunity host

    Shaun I have installed it I will let you know how things go

  • Shaun Johnston replied

    Thanks Shelley :)

  • Dave Pearson

    Dave Pearsonbeta tester

    Sorry Shaun, should have thought to say:

    0.8.20080609.0

  • Shaun Johnston replied

    Interesting. I wonder why that is? Unfortunately the ‘type’ keyword is only referred to in the compressed jquery library that markItUp uses, and the compressed markItUp code itself. I’ll take a look anyway and see if I can determine the cause. Might install Firefox 2 in order to do so.

  • Soxy Fleming

    Soxy Fleming

    shaun this is way above my head! just know that your roses are my favourites!

  • Shaun Johnston replied

    Thanks Soxy :p

    I got a new lens adapter today so I’m itching to try some of my new lenses! Might have some more rose photos in the coming days, not sure.

  • Cathie Tranent

    Cathie Tranentcommunity host

    Are you using FF 3 then Shaun. I am if you’re not – and so I can test for you – but not right now – this is a hit and run posting …

  • Shaun Johnston replied

    Hi Cathy,

    I am using Firefox 3 … at least I was until the Firefox 2 install I just ran overwrote my FF3 install! Ahh …

    Anyway, yeah it seemed to be running fine on FF3 so I’d like to know if it runs for you :)

  • Dave Pearson

    Dave Pearsonbeta tester

    Okay. If I get a bit of spare time I’ll have a dig around the code too and see if I can see what the issue is.

  • Shaun Johnston replied

    Thanks Dave,

    Getting the same problem in FF2 here as well. Only found one reference to the c.type error when googling for it, and it’s not much help.

  • Shaun Johnston replied

    Seems to be something to do with a sanboxed eval that Greasemonkey attempts. My jquery and markItUp instances are created using eval statements so I guess greasemonkey tries to do that safely and something is b0rking as a result.

  • Shaun Johnston replied

    Just to follow up on this – got it working now. I ended up dispensing with the packed jQuery and using the unpacked version. No eval there. It triples the total script size but it’s a once-off download I guess so it shouldn’t be a big problem.

  • Cathie Tranent

    Cathie Tranentcommunity host

    OMG Works beautifully for me. (Won’t be doing anything from IE at work now)

    Thanks very much. It’s a super script!!

  • Cathie Tranent

    Cathie Tranentcommunity host

    Just testing the other thingys for thoroughness.

    Italic
    • One
      Two
      Three
    1. A
      B
      C

    This is not substandard.

    > Thanks Dave,
    said Shaun


  • Cathie Tranent

    Cathie Tranentcommunity host

    Okay – the bullets were my fault – did’nt use it for each

    • One
    • Two
    • Three
    1. A
    2. B
    3. C

    >The quote

    appears to put a space between the > and the text.

  • Shaun Johnston replied

    With the ordered list (should be numeric) it actually appears to be an RB problem! If you look at the source it is showing OL (ordered list) tags.

  • Cathie Tranent

    Cathie Tranentcommunity host

    And the numeric list is coming up as you see above.

    The quote one isn’t working either – I removed the space manually and yet still nada.

  • Shaun Johnston replied

    Thanks Cathie :)

    I now have it working under FF2 it seems, so I will work on these problems now as well.

  • Shaun Johnston replied

    With the quote, I believe it only works on the first line of forum posts (maybe it works in normal posts as well, not sure). I might try putting in some sort of styled blockquote later.

  • Soxy Fleming

    Soxy Fleming

    fantastic. me and the 11 year old have been trying to get this thing of yours working and I don’t think I am quite as stupid as all that but even the young wizz doesn’t quite know what she is doing (maybe it’s just too late for both of us)

  • Shaun Johnston replied

    It is pretty late! Bed for me soon.

    It needs to run on Firefox, with the Greasemonkey addon installed. Once they’re installed you should be able to grab the latest version of the script from the link in the journal entry (open in a new tab or window). Greasemonkey should detect it and ask if you want to install it, and once it installs it, the toolbar should then appear over any text boxes on RedBubble.

  • Soxy Fleming

    Soxy Fleming

    yes I think I did all that but nothing is appearing. bed time now I’ll follow it up later!

  • Cathie Tranent

    Cathie Tranentcommunity host

    Night Soxy!!

  • Dave Pearson

    Dave Pearsonbeta tester

    Yup! That works.

  • Dave Pearson

    Dave Pearsonbeta tester

    One thing for Soxy to try: assuming FF2.x is being used, and assuming that the previous non-working (for FF2.x) version had been installed, there’s a good chance the working version will appear not to work too. It didn’t for me.

    The problem is browser caching. I had to do the following to get myself up and running (some of this will be “belt and braces”):

    • Via the Greasemonkey script manager, uninstall the script
    • Under Tools, Options, privacy, clear the browser’s cache
    • Reinstall the script

    If that was the problem it should then work (did for me).

  • Shaun Johnston replied

    Oh yes, I initially had that problem as well, even under FF3.

  • David Iori

    David Iori

    Nice work Shaun well done

  • Shaun Johnston replied

    Thanks David :)

    I am going to try to add a preview button to it today so stay tuned!

  • Tracy Wallace

    Tracy WallaceVolunteer

    works brilliantly so far. Left a reply in the main forum post. Thanks Shaun

  • Shelley Heath

    Shelley Heathcommunity host

    I have noticed that when replying to comments the row of formatting buttons becomes a column down the left hand side, this is also true for the formatting in Private sites (but there another issue best left alone until out of beta).

    Not that it inconveniences me… maybe it is because there is another comment box on the page (?), like with the private sites there are two input boxes. Just a thought

  • Shaun Johnston replied

    Thanks Shelley, I noticed that myself. Will work on a resolution :)

  • Crowmanic

    Crowmanic

    G’day Shaun … just came across this … I’m on Ff v3.0.1 … any updates on the script? re compatibility—usability … or have you stopped the refinement/upgrades since v2 ?

  • Crowmanic

    Crowmanic

    PS: Ok, I should have read all the comments/feedback … I’ll give it a go … sorry about that

  • Crowmanic

    Crowmanic

    PSS: (several minutes later) Feedback ... Thanks Shaun, just installed/ran/used … seems to be just fine … though the “format buttons” run vertical when Replying to Comment ... any updates pending? Apart from that, great little add-in, to help speed-up the typing/response loop on RB … TC4N

Add your comment

You need to login or signup to add your comment to this work.