Permalink
Browse files

Use version of dotcss extension on Chrome Web Store.

Closes #9, thanks @marksands
  • Loading branch information...
1 parent e7387d5 commit 2909f7f108195b52edc28d027c8a2cc417312122 @stewart committed Mar 1, 2013
Showing with 56 additions and 41 deletions.
  1. +6 −3 Rakefile
  2. +6 −1 bin/dcssd
  3. BIN builds/dotcss.crx
  4. +8 −7 ext/manifest.json
  5. +36 −30 readme.md
View
@@ -98,8 +98,10 @@ namespace :install do
desc 'Install Chrome/Chromium extension'
task :chrome do
- puts '', " \e[31mIMPORTANT!\e[0m Drag builds/dotcss.crx to Chrome/Chromium."
- puts " I can't install it for you.", ''
+ puts <<-EOS.chomp
+ Now you need to install the dotcss extension for Chrome.
+ You can get it here: http://j.mp/dotcss_chrome_ext
+ EOS
end
end
@@ -121,6 +123,7 @@ namespace :uninstall do
puts ''
puts ' I will not remove:'
puts ' 1. ~/.css'
+ puts ' 2. The dotcss Chrome extension'
puts ''
print ' Ok? (y/n) '
@@ -168,7 +171,7 @@ namespace :uninstall do
desc 'Uninstall Chrome extension'
task :chrome do
puts " \e[1mplease uninstall the chrome extension manually:\e[0m"
- puts ' chrome/chromium > window > extensions > dotcss > uninstall'
+ puts ' chrome > window > extensions > dotcss > uninstall'
end
end
View
@@ -61,7 +61,12 @@ dotcss = Class.new(WEBrick::HTTPServlet::AbstractServlet) do
end
end
-server = WEBrick::HTTPServer.new(:Port => 1243)
+server_options = {
+ :BindAddress => "127.0.0.1",
+ :Port => 1243,
+}
+
+server = WEBrick::HTTPServer.new(server_options)
server.mount('/', dotcss)
%w( INT TERM ).each do |sig|
View
Binary file not shown.
View
@@ -1,13 +1,14 @@
{
- "name" : "dotcss",
- "version" : "1.0.1",
- "description" : "~/.css",
+ "name" : "dotcss",
+ "manifest_version" : 2,
+ "version" : "2.0.0",
+ "description" : "~/.css",
"icons": { "48" : "icon48.png", "128" : "icon128.png" },
"content_scripts": [{
- "all_frames": true,
- "run_at" : "document_start",
- "matches" : ["http://*/*", "https://*/*"],
- "js" : ["jquery.js", "dotcss.js"]
+ "all_frames" : true,
+ "run_at" : "document_start",
+ "matches" : ["http://*/*", "https://*/*"],
+ "js" : ["jquery.js", "dotcss.js"]
}],
"permissions": ["tabs"]
}
View
@@ -1,60 +1,66 @@
# dotcss
-dotcss is a Google Chrome extension that imports `.css` files in `~/.css` based on their filename.
+dotcss is two(2) things:
-If you go to `https://github.com`, dotcss will load `~/.css/github.com.css`.
+ 1. A [tiny web server][server] that runs on your machine, serving CSS files
+ out of `~/.css`
+ 2. A [Chrome extension][extension] that fetches these CSS files and injects
+ them based on their filename.
-This makes it super simple to change and improve the look of your favourite pages.
+The files are requested on a per-page basics, based on the hostname. For
+example, if you go to [https://github.com](https://github.com),
+`~/.css/github.com.css` would be injected into the page.
-## how it works
+This makes it super simple and easy to change and improve the look of your favorite sites.
-Chrome extensions can't access the local filesystem, so dotcss runs a tiny web server on port 1243 that serves files out of the `~/.css` folder
+## How it works
-## requires
+Chrome extensions can't access the filesystem, so dotcss runs a [tiny web
+server][server] on port 1243 that serves files out of the `~/.css` folder.
+
+## Requirements
- OS X or Linux
- Ruby 1.8 or newer
- rake (`gem install rake`)
- Chrome or Chromium
- `/usr/local/bin` in your `$PATH`
-- on Linux: `exo-open` (Can be found in [exo-utils](http://packages.ubuntu.com/search?keywords=exo-utils) on Ubuntu. Required until [Bug #378783 in xdg-utils](https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/378783) is fixed.)
+- on Linux: `exo-open` (Can be found in [exo-utils][] on Ubuntu. Required until
+ [Bug #378783 in xdg-utils][exo-bug] is fixed.)
-## install
+## Installation
git clone http://github.com/stewart/dotcss.git
cd dotcss
rake install
-## chromium vs. google chrome vs. chrome canary
-
-Multiple versions of Chrome installed? Drag `builds/dotcss.crx` to whichever is your favourite.
-
-## quick notes on css
+Then, go grab the [Chrome extension][extension] and have fun!
-If your CSS isn't working, it means one of three things:
+## Uninstallation
-1. Your selectors are off - by this, I mean either you're trying to style the wrong element, or your selector isn't specific enough to override the existing CSS
-2. Inline styles are preventing you from styling the element
-3. dotcss fucked up
-
-The first two are more likely than the third, but if you run into something weird, please file an issue and I'll try to help you.
+ rake uninstall
-## uninstall
+## Chrome/Chromium/Chrome Canary
- rake uninstall
+If you have multiple versions of Chrome installed, just install the
+[extension][] in whichever one you fancy.
-## troubleshooting
+## Troubleshooting
-Attempting to run `rake install` within a tmux session in OSX will fail with the following error:
+Attempting to run `rake install` within a tmux session may fail with the following error:
-```
-Could not open job overrides database at: /private/var/db/launchd.db/com.apple.launchd/overrides.plist: 13: Permission denied
-launchctl: Error unloading: com.averagestudios.dotcss
-```
+ Could not open job overrides database at: /private/var/db/launchd.db/com.apple.launchd/overrides.plist: 13: Permission denied
+ launchctl: Error unloading: com.averagestudios.dotcss
-This is because running `launchctl` within a tmux session will bootstrap in the root context. Avoid this by exiting your tmux session first.
+To avoid this, quit tmux before installing dotcss.
+## Thanks
-## thanks
+- [Chris Wanstrath][defunkt] for [dotjs][], which 90% of this is based on.
-- Chris Wanstrath for [dotjs](http://github.com/defunkt/dotjs), which 90% of this is based on.
+[server]: https://github.com/stewart/dotcss/blob/master/bin/dcssd
+[extension]: http://j.mp/dotcss_chrome_ext
+[exo-utils]: http://packages.ubuntu.com/search?keywords=exo-utils
+[exo-bug]: https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/378783
+[defunkt]: https://github.com/defunkt
+[dotjs]: https://github.com/defunkt/dotjs

0 comments on commit 2909f7f

Please sign in to comment.