Userscripts Source Highlighter

Last update on Aug 17, 2007

Provides a link to a source highlighted version of the userscript being viewed.




You could comment on this script if you were logged in.

11 comments Feed-icon

1 point
login to vote
fire_015 script's author
Posted May 3, 2007

Simon I dont understand...?

1 point
login to vote
simon! scriptwright
Posted May 3, 2007

R U working on my problem? (try again)

1 point
login to vote
fire_015 script's author
Posted May 3, 2007

Bug fixed, thanks!

1 point
login to vote
simon! scriptwright
Posted Apr 30, 2007
1 point
login to vote
simon! scriptwright
Posted Apr 30, 2007
1 point
login to vote
znerp scriptwright
Posted Apr 24, 2007

I really like this script, and I use it a lot, but I have one small criticism. When looking at my own scripts, the link gets appended to a different list to on other script pages. I've fixed this for myself, but it's probably not the most elegant way to do it. Maybe this is something you might want to fix.

My fix:

var h6 = document.getElementsByTagName('h6');
      if ((h6.length > 3) && (h6[h6.length - 4].innerHTML == "Admin for script"))
        n[n.length - 2].innerHTML += '<li><a href="'+url+'">View highlighted script source</a></li>';
      else
        n[n.length - 1].innerHTML += '<li><a href="'+url+'">View highlighted script source</a></li>';
      

1 point
login to vote
Henrik N admin
Posted Mar 30, 2007

This has been added, but is not live on the site yet: http://userscripts.devjavu.com/projects/userscr...

1 point
login to vote
Adrian scriptwright
Posted Mar 27, 2007

Wow, this was exactly what I've been looking for...

1 point
login to vote
fire_015 script's author
Posted Mar 27, 2007

Thanks for the suggestion Lior, script updated.

1 point
login to vote
Lior Zur scriptwright
Posted Mar 26, 2007

Good script. Minor bug report: You're adding the "View highlighted script source" to the first [ul] list on the page, but you forget that script descriptions can have lists too, so on some pages you append it to the wrong list. Appending it to the LAST list on the page should solve this, I think.

1 point
login to vote
Henrik N admin
Posted Mar 26, 2007

Very nice. We plan to add this at some point – if you know your way around Ruby on Rails, feel free to submit a patch to get this without a userscript. See http://userscripts.devjavu.com, http://userscripts.devjavu.com/projects/userscr....

You could comment on this script if you were logged in.