Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by glass_of_water on Saturday November 23, 2013 @06:22PM
(#6787875)
If all you want to do is execute your own js on a certain web page, you can just use greasemonkey or another userscript extension for your browser instead of writing a whole new extension each for each script.
Greasemonkey also appears to provide an interface for peristent local storage as well. [1]
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by johnpmayer on Saturday November 23, 2013 @11:04PM
(#6788667)
The lay user is probably more likely to install a chrome extension than code. Then again, I don't know if greasemonkey has gotten more lay-friendly recently.
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by kbenson on Saturday November 23, 2013 @07:03PM
(#6788005)
I've taken to using a simple server on a public IP that serves different JS based on the referrer, and a bookmark for inserting a script tag in the current page.
It doesn't auto run, but it is easy test, install on a new system (just a bookmark!), and extend with extra behavior that can be centralized. Additionally, an update immediately affects all clients.
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by jrstanley on Saturday November 23, 2013 @08:23PM
(#6788239)
It looks like this kind of practice is quite popular. I recently created a Chrome extension to extend Airbnb listings to show crime statistics and nearby photos from Flickr.
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by conradev on Saturday November 23, 2013 @06:31PM
(#6787913)
> "I wanted to share a few examples of a powerful skill that I’ve been gradually picking up over the last year. It is simply the ability to quickly hack together custom browser extensions in Chrome and using them to customize my favorite websites."
Having this ability on every platform you use can be very powerful indeed, which is why I always have a jailbroken/rooted phone to customize[1].
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by Aardwolf on Sunday November 24, 2013 @06:58AM
(#6789393)
I do this too, though often with bookmarklets or with a plugin that runs JS on certain URLs.
One annoyance though is when the website changes their code. E.g. often CSS class names are shortened/compiled and will change with every update of the website.
Does anyone have tips how to handle that, that is, ways to get the right element without depending on the exact classname?
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by TheCowboy on Saturday November 23, 2013 @06:48PM
(#6787964)
I also have a personalized extension I use for several sites and general browsing.
For viewing news.ycombinator.com on my larger monitor, I have it add 25% left and right margins. I also have it enlarge the article titles regardless of screen size so I don't have to zoom every time.
If you already know JavaScript, then it's really convenient and easy to pick up.
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by oddshocks on Sunday November 24, 2013 @11:01AM
(#6789888)
"That’s the passive aggressive look of Twitter telling you that there are two more tweets to show, but also refusing to actually show them. That would be too useful to their users. Instead, they want you to stop what you’re doing and click the button to load the new tweets."
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by karpathy on Sunday November 24, 2013 @02:34PM
(#6790744)
Interesting, Based on my own discussions with friends and my own experience, it's considered strictly annoying and done likely to save bandwidth or something. Can you explain what you like about it?
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by oddshocks on Monday December 02, 2013 @11:42AM
(#6834690)
I like knowing which tweets I've read. If it says that there are new tweets, can click it and see the new tweets appear. If they just appeared on the feed, I wouldn't know as easily which tweets are new. Does that make sense? I guess I just like being able to load the new tweets on-demand.
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by nswanberg on Saturday November 23, 2013 @07:52PM
(#6788150)
Chrome Dev Tools have become powerful enough to do some decent debugging for extensions, but does anyone know if it can be used to create them? If there is some sort of sandboxing to prevent such things, how much code would have to be changed to have Chrome join the list of self-extensible systems?
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by nswanberg on Saturday November 23, 2013 @09:21PM
(#6788389)
That's cool but I meant the ability to get an idea for an extension, create it, and load it without leaving Chrome. Chrome already has Codemirror and some ability to store files using snippets, so why not extend that to create things?
I realize this an exceptional use case but it'd be great to see Chrome fit Steve Yegge's QWAN concept, where one of the ideas is that a system should be modifiable and extendible without rebooting, much like Emacs (Chrome is so close to being there it hurts, but is likely intentionally prevented from working that way).
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by eli on Sunday November 24, 2013 @08:56PM
(#6792104)
Ah, now I understand. I believe the Stylebot extension lets you live-edit a page and then save the edits. Don't know about things more complicated than CSS though.
Re:Chrome Extension Programming: Illustrating a Basic Surviv...
by nswanberg on Sunday November 24, 2013 @11:19PM
(#6792459)
Thanks. I'll take a look at Stylebot. I'm pretty convinced what I'm looking to do isn't possible with default Chrome, but it might be, and I'd guess that I'm not the first person to wonder this.
Greasemonkey also appears to provide an interface for peristent local storage as well. [1]
[1] http://wiki.greasespot.net/GM_setValue
(shameless plug - http://userscripts.org/scripts/show/178736)
https://chrome.google.com/webstore/detail/control-freak/jgnc...
(Disclaimer: I wrote it originally, but no longer the maintainer.)
It doesn't auto run, but it is easy test, install on a new system (just a bookmark!), and extend with extra behavior that can be centralized. Additionally, an update immediately affects all clients.
I've shared it on the Chrome web store and GitHub on the off-chance it's of interest to anyone else https://chrome.google.com/webstore/detail/crime-stats-and-ph...
Having this ability on every platform you use can be very powerful indeed, which is why I always have a jailbroken/rooted phone to customize[1].
[1] http://www.cydiasubstrate.com
One annoyance though is when the website changes their code. E.g. often CSS class names are shortened/compiled and will change with every update of the website.
Does anyone have tips how to handle that, that is, ways to get the right element without depending on the exact classname?
For viewing news.ycombinator.com on my larger monitor, I have it add 25% left and right margins. I also have it enlarge the article titles regardless of screen size so I don't have to zoom every time.
If you already know JavaScript, then it's really convenient and easy to pick up.
https://chrome.google.com/webstore/detail/trello-to-github-i...
I dunno, I actually like that feature.
I realize this an exceptional use case but it'd be great to see Chrome fit Steve Yegge's QWAN concept, where one of the ideas is that a system should be modifiable and extendible without rebooting, much like Emacs (Chrome is so close to being there it hurts, but is likely intentionally prevented from working that way).