Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Read code on the browser with ease. (chrome.google.com)
79 points by tsenart on March 18, 2011 | hide | past | favorite | 24 comments


This is pretty neat, but the description fails to mention which languages it supports. I tend to look at githubs for a lot of weird languages and if this thing can properly highlight F# then I'm installing it on all my computers.



Thant's something to think of. The extension page now has the list of languages supported. Maybe I'll add some more soon. ;) Share and enjoy.


I got to "this app wants to see all of your browsing history" and thought to myself, "why the hell would they want that?" So I clicked cancel and didn't install it.


About that... I make no use of the user's browser history. But I need the "tabs" permissions. I also have to be able to access all urls. I could indeed access all your history and data with these permissions but that's a byproduct of the functioning and intent of the extension. I make no such thing... Just highlight code. Here is my manifest.json

{ "name": "Sight", "version": "1.6.3", "description": "The Syntax Highlighter for Chrome", "minimum_chrome_version": "8", "background_page": "background.html", "options_page": "options.html", "permissions": ["tabs", "<all_urls>"], "page_action": { "default_title": "Change language", "default_icon": "images/icon19.png", "default_popup": "popup.html" }, "icons": { "16": "images/icon16.png", "48": "images/icon48.png", "128": "images/icon128.png" } }


I decided it's going to be really useful, so I saved & unzipped .crx to see what code it wants to inject into pages. Looks like fine javascript, so I have it installed. (Though, of course, it can be updated with some evilness later. Unfortunately, too much suspicion is often counterproductive.)


It would be better if it inserted line breaks:

http://ws.audioscrobbler.com/2.0/?method=library.gettracks&#...


It does. It was a bug on language detection. Just fixed it ;) Update.


That's really nice to have, though now the line numbers don't actually match up with the original file. Would it be possible to change that?


Tell me the URL for me to debug please.


I meant in the one discussed above,

http://ws.audioscrobbler.com/2.0/?method=library.gettracks&#...

It was originalyl all on one line, but now it has numbers for hundreds of lines that don't actually exist except for formatting.


Jeremy that's strange. Tell me this stuff: Chrome version: OS and version: Sight version:


it would be great to have ability perform beautify(like http://jsbeautifier.org/ does) of such code.


It visually looks a lot like Kod. (http://kodapp.com)


Does a Firefox equivalent exist?


Not at the moment. It's only for Chrome.


Good thing too, because Chrome's rendering of XML and JSON pages has been nearly useless for casual reading. I love this extension already!


I've been using this for awhile now and it's been really invaluable for looking through stuff like JSON feeds or raw JS. Also has some nice color themes and font options.


Excellent. It supports highlighting diffs!


Is editing code on a very dark background the norm now, or just the Hot New Thing?


It may be hot, it may be the norm, but it certainly isn't new....


I believe it is. Perhaps you're referring to the old standard of black background terminals. If you look at mainstream desktop editors, the popular trend from the late 80's through the 90's was ever lighter backgrounds. Now, it seems, the popular trend is toward various dark shades.

Incidentally, I'm at a loss as to why I received downvotes for asking about design.


People believe that dark background makes extensive reading from the screen easier for the eyes, and many advanced users accustomed themselves to it while working without GUI. So yes, light text on dark background is and always has been especially common among programmers.


and many advanced users accustomed themselves to it while working without GUI

Ah, the old HN anti-GUI bias again.

As for the eyestrain issue, I suspect people don't remember how bad CRT monitors were until near the end. Getting a consistent, bright white was difficult and very expensive. Horrible dot pitch meant bloom between very bright and dark colors. Color-related eyestrain just isn't the issue that it used to be.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: