Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use version of dotcss extension on Chrome Web Store.

Closes #9, thanks @marksands
  • Loading branch information...
commit 2909f7f108195b52edc28d027c8a2cc417312122 1 parent e7387d5
Andrew Stewart authored February 28, 2013
9  Rakefile
@@ -98,8 +98,10 @@ namespace :install do
98 98
 
99 99
   desc 'Install Chrome/Chromium extension'
100 100
   task :chrome do
101  
-    puts '', "  \e[31mIMPORTANT!\e[0m Drag builds/dotcss.crx to Chrome/Chromium."
102  
-    puts "  I can't install it for you.", ''
  101
+    puts <<-EOS.chomp
  102
+  Now you need to install the dotcss extension for Chrome.
  103
+  You can get it here: http://j.mp/dotcss_chrome_ext
  104
+    EOS
103 105
   end
104 106
 end
105 107
 
@@ -121,6 +123,7 @@ namespace :uninstall do
121 123
     puts ''
122 124
     puts '  I will not remove:'
123 125
     puts '  1. ~/.css'
  126
+    puts '  2. The dotcss Chrome extension'
124 127
     puts ''
125 128
     print '  Ok? (y/n) '
126 129
 
@@ -168,7 +171,7 @@ namespace :uninstall do
168 171
   desc 'Uninstall Chrome extension'
169 172
   task :chrome do
170 173
     puts "  \e[1mplease uninstall the chrome extension manually:\e[0m"
171  
-    puts '  chrome/chromium > window > extensions > dotcss > uninstall'
  174
+    puts '  chrome > window > extensions > dotcss > uninstall'
172 175
   end
173 176
 end
174 177
 
7  bin/dcssd
@@ -61,7 +61,12 @@ dotcss = Class.new(WEBrick::HTTPServlet::AbstractServlet) do
61 61
   end
62 62
 end
63 63
 
64  
-server = WEBrick::HTTPServer.new(:Port => 1243)
  64
+server_options = {
  65
+  :BindAddress => "127.0.0.1",
  66
+  :Port => 1243,
  67
+}
  68
+
  69
+server = WEBrick::HTTPServer.new(server_options)
65 70
 server.mount('/', dotcss)
66 71
 
67 72
 %w( INT TERM ).each do |sig|
BIN  builds/dotcss.crx
Binary file not shown
15  ext/manifest.json
... ...
@@ -1,13 +1,14 @@
1 1
 {
2  
-  "name"        : "dotcss",
3  
-  "version"     : "1.0.1",
4  
-  "description" : "~/.css",
  2
+  "name"             : "dotcss",
  3
+  "manifest_version" : 2,
  4
+  "version"          : "2.0.0",
  5
+  "description"      : "~/.css",
5 6
   "icons": { "48" : "icon48.png", "128" : "icon128.png" },
6 7
   "content_scripts": [{
7  
-    "all_frames": true,
8  
-    "run_at"    : "document_start",
9  
-    "matches"   : ["http://*/*", "https://*/*"],
10  
-    "js"        : ["jquery.js", "dotcss.js"]
  8
+    "all_frames" : true,
  9
+    "run_at"     : "document_start",
  10
+    "matches"    : ["http://*/*", "https://*/*"],
  11
+    "js"         : ["jquery.js", "dotcss.js"]
11 12
   }],
12 13
   "permissions": ["tabs"]
13 14
 }
66  readme.md
Source Rendered
... ...
@@ -1,60 +1,66 @@
1 1
 # dotcss
2 2
 
3  
-dotcss is a Google Chrome extension that imports `.css` files in `~/.css` based on their filename.
  3
+dotcss is two(2) things:
4 4
 
5  
-If you go to `https://github.com`, dotcss will load `~/.css/github.com.css`.
  5
+  1. A [tiny web server][server] that runs on your machine, serving CSS files
  6
+     out of `~/.css`
  7
+  2. A [Chrome extension][extension] that fetches these CSS files and injects
  8
+     them based on their filename.
6 9
 
7  
-This makes it super simple to change and improve the look of your favourite pages.
  10
+The files are requested on a per-page basics, based on the hostname. For
  11
+example, if you go to [https://github.com](https://github.com),
  12
+`~/.css/github.com.css` would be injected into the page.
8 13
 
9  
-## how it works
  14
+This makes it super simple and easy to change and improve the look of your favorite sites.
10 15
 
11  
-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
  16
+## How it works
12 17
 
13  
-## requires
  18
+Chrome extensions can't access the filesystem, so dotcss runs a [tiny web
  19
+server][server] on port 1243 that serves files out of the `~/.css` folder.
  20
+
  21
+## Requirements
14 22
 
15 23
 - OS X or Linux
16 24
 - Ruby 1.8 or newer
17 25
 - rake (`gem install rake`)
18 26
 - Chrome or Chromium
19 27
 - `/usr/local/bin` in your `$PATH`
20  
-- 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.)
  28
+- on Linux: `exo-open` (Can be found in [exo-utils][] on Ubuntu. Required until
  29
+  [Bug #378783 in xdg-utils][exo-bug] is fixed.)
21 30
 
22  
-## install
  31
+## Installation
23 32
 
24 33
     git clone http://github.com/stewart/dotcss.git
25 34
     cd dotcss
26 35
     rake install
27 36
 
28  
-## chromium vs. google chrome vs. chrome canary
29  
-
30  
-Multiple versions of Chrome installed? Drag `builds/dotcss.crx` to whichever is your favourite.
31  
-
32  
-## quick notes on css
  37
+Then, go grab the [Chrome extension][extension] and have fun!
33 38
 
34  
-If your CSS isn't working, it means one of three things:
  39
+## Uninstallation
35 40
 
36  
-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
37  
-2. Inline styles are preventing you from styling the element
38  
-3. dotcss fucked up
39  
-
40  
-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.
  41
+    rake uninstall
41 42
 
42  
-## uninstall
  43
+## Chrome/Chromium/Chrome Canary
43 44
 
44  
-    rake uninstall
  45
+If you have multiple versions of Chrome installed, just install the
  46
+[extension][] in whichever one you fancy.
45 47
 
46  
-## troubleshooting
  48
+## Troubleshooting
47 49
 
48  
-Attempting to run `rake install` within a tmux session in OSX will fail with the following error:
  50
+Attempting to run `rake install` within a tmux session may fail with the following error:
49 51
 
50  
-```
51  
-Could not open job overrides database at: /private/var/db/launchd.db/com.apple.launchd/overrides.plist: 13: Permission denied
52  
-launchctl: Error unloading: com.averagestudios.dotcss
53  
-```
  52
+    Could not open job overrides database at: /private/var/db/launchd.db/com.apple.launchd/overrides.plist: 13: Permission denied
  53
+    launchctl: Error unloading: com.averagestudios.dotcss
54 54
 
55  
-This is because running `launchctl` within a tmux session will bootstrap in the root context. Avoid this by exiting your tmux session first.
  55
+To avoid this, quit tmux before installing dotcss.
56 56
 
  57
+## Thanks
57 58
 
58  
-## thanks
  59
+- [Chris Wanstrath][defunkt] for [dotjs][], which 90% of this is based on.
59 60
 
60  
-- Chris Wanstrath for [dotjs](http://github.com/defunkt/dotjs), which 90% of this is based on.
  61
+[server]: https://github.com/stewart/dotcss/blob/master/bin/dcssd
  62
+[extension]: http://j.mp/dotcss_chrome_ext
  63
+[exo-utils]: http://packages.ubuntu.com/search?keywords=exo-utils
  64
+[exo-bug]: https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/378783
  65
+[defunkt]: https://github.com/defunkt
  66
+[dotjs]: https://github.com/defunkt/dotjs

0 notes on commit 2909f7f

Please sign in to comment.
Something went wrong with that request. Please try again.