Userscripts Source Highlighter

By fire_015 Last update Aug 17, 2007 — Installed 761 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 12 posts, 7 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
fire_015 Script's Author

Simon I dont understand...?

 
simon! Scriptwright

R U working on my problem? (try again)

 
fire_015 Script's Author

Bug fixed, thanks!

 
simon! Scriptwright

same for TryAgain :: Firefox Add-ons >.<

 
simon! Scriptwright

bug!?
http://img300.imageshack.us/img300/8220/4125817...

 
znerp Scriptwright

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 &gt; 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>';

 
Henrik N Admin

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

 
Adrian Scriptwright

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

 
fire_015 Script's Author

Thanks for the suggestion Lior, script updated.

 
Lior Zur Scriptwright

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.

 
Henrik N Admin

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....

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel