-2

I'm writing a GreaseMonkey script, as part of which I'd like to sort a list by dragging its items. I'm using mootools, but the component for sortable lists doesn't work in the GM sandboxed environment. Can you recommend a smallish library/piece of code to do list sorting in the most lightweight fashion? I want it to be independant of any large framework and don't feel like implementing it myself.

Crescent Fresh
  • 115,249
  • 25
  • 154
  • 140
VoY
  • 5,479
  • 2
  • 37
  • 45

2 Answers2

1

If you need to debug a library such as mootools, instead of @require-ing it, just copy/paste the entire source into your own script. Then you can debug it the same as your own code.

On another note, this script includes the ability to drag-and-drop it's own window around the screen, with no additional library. Maybe you could analyze it and borrow code?

Lil Devil
  • 663
  • 5
  • 10
0

I'm not sure if there are any particular issues with just MooTools, but in general you may include external scripts into a GreaseMonkey script.

This has been addressed in previous questions like this one or this, as well as on the GreaseSpot wiki.

Community
  • 1
  • 1
stpe
  • 3,611
  • 3
  • 31
  • 38
  • There are issues with the component I need from mootools-more... unfortunately it doesn't work and the way GM reports errors makes it near impossible to debug, as it doesn't tell me the number of the offending line. – VoY Dec 15 '09 at 12:21