Skip to content
This repository
Browse code

remove website directory; let extension be hosted on chrome.google.com

  • Loading branch information...
commit d8e6dfaf0350cf0f335be856bd3c6c07c1b27bd0 1 parent 0b27840
Jehiah Czebotar authored
1  .gitignore
... ...
@@ -0,0 +1 @@
  1
+build
6  README.txt
... ...
@@ -1,9 +1,7 @@
1  
-bit.ly chrome extension
  1
+bit.ly Chrome Extension
2 2
 =======================
3 3
 
4  
-This is the official bit.ly chrome extension. It is currently in alpha development and is not designed for widespread use.
5  
-
6  
-Official versions can be found at http://chrome.bit.ly/
  4
+This is the official bit.ly chrome extension.
7 5
 
8 6
 Installing
9 7
 ==========
10  bitly_chrome_extension.nginx.conf
... ...
@@ -0,0 +1,10 @@
  1
+
  2
+server {
  3
+        listen 80;
  4
+        server_name chrome.*;
  5
+        access_log /bitly/log/nginx/bitly_chrome_extension.log upstream;
  6
+        proxy_ignore_client_abort on;
  7
+        log_subrequest on;
  8
+        
  9
+        rewrite .* https://chrome.google.com/extensions/detail/iabeihobmhlgpkcgjiloemdbofjbdcic permanent;
  10
+}
10  deploy_extension.sh → build.sh
@@ -23,12 +23,10 @@ perl -pe 's/(\s+.version.: .\d+\.\d+\.\d+\.)(\d+)/$1.($2+1)/eg' -i "src/manifest
23 23
 VERSION=`cat src/manifest.json | grep '"version"' | awk -F '"' '{print $4}'`
24 24
 echo "new extension version is $VERSION"
25 25
 
26  
-# update in the updates.xml file
27  
-perl -pi -e "s/version=\"(\d\.)+\d+\"\s\/>/version=\"$VERSION\" \/>/g" "website/static/chrome_extension_updates.xml"
28  
-echo "__version__ = \"$VERSION\"" > website/current_version.py;
29  
-
  26
+# build the crx file
  27
+mkdir -p "$CWD/build"
30 28
 echo "compiling bitly_chrome_extension.crx";
31 29
 "$CHROME" --pack-extension=$CWD/src --pack-extension-key=$KEY --no-message-box
32  
-mv "$CWD/src.crx" "$CWD/bitly_chrome_extension-$VERSION.crx"
33  
-echo "built bitly_chrome_extension-$VERSION.crx";
  30
+mv "$CWD/src.crx" "$CWD/build/bitly_chrome_extension-$VERSION.crx"
  31
+echo "finished build/bitly_chrome_extension-$VERSION.crx";
34 32
 
5  export.sh
... ...
@@ -1,5 +0,0 @@
1  
-#!/bin/sh
2  
-
3  
-mkdir -p /bitly/local/bitly_chrome_extension
4  
-echo "deploying bitly_chrome_extension"
5  
-/bitly/local/bin/git checkout-index -a -f --prefix=/bitly/local/bitly_chrome_extension/
4  src/manifest.json
@@ -10,6 +10,7 @@ The version number is automatically incremented by deploy_extension.sh
10 10
   "version": "0.1.3.3",
11 11
   "options_page": "options.html",
12 12
   "description": "Shorten, share and track your urls",
  13
+  "default_locale": "en",
13 14
   "background_page": "background.html",
14 15
   "browser_action": {
15 16
     "default_title": "bit.ly",  
@@ -32,6 +33,5 @@ The version number is automatically incremented by deploy_extension.sh
32 33
      "matches": ["http://*/*"],
33 34
      "js": ["js/content_plugins/bitly.urlexpander.js"]
34 35
     }
35  
-  ],
36  
-  "update_url": "http://chrome.bit.ly/static/bitly_chrome_extension_updates.xml"   
  36
+  ]
37 37
 }
25  website/conf/bitly_chrome_extension.nginx.conf
... ...
@@ -1,25 +0,0 @@
1  
-
2  
-server {
3  
-        listen 80;
4  
-        server_name chrome.*;
5  
-        access_log /bitly/log/nginx/bitly_chrome_extension.log upstream;
6  
-        proxy_ignore_client_abort on;
7  
-        log_subrequest on;
8  
-        
9  
-        if ($host ~* www\.(.*)) {
10  
-            rewrite ^/(.*)$ http://chrome.bit.ly/$1 permanent;
11  
-        }
12  
-        
13  
-        location / {
14  
-            proxy_set_header Host $host;
15  
-            proxy_set_header X-Real-IP $remote_addr;
16  
-            proxy_pass_header Server;
17  
-            proxy_pass http://bitly_chrome_extension;
18  
-            proxy_redirect off;
19  
-            proxy_connect_timeout 5;
20  
-            proxy_send_timeout 10;
21  
-            proxy_read_timeout 10;
22  
-            charset utf-8;
23  
-            limit_conn one 20;
24  
-        }
25  
-}
1  website/current_version.py
... ...
@@ -1 +0,0 @@
1  
-__version__ = "0.1.3.3"
30  website/static/base.css
... ...
@@ -1,30 +0,0 @@
1  
-/* 
2  
-    RESETS  
3  
-*/
4  
-* { padding:0; margin:0; }
5  
-body {
6  
-    font-family:Arial, sans-serif;
7  
-    font-size:13px;
8  
-    background-color:#FFF;
9  
-    color:#555;
10  
-}
11  
-h1,h2,h3,h4,h5,h6,input,select,option,textarea {
12  
-    font-size:13px;
13  
-    font-family:Arial, sans-serif;    
14  
-}
15  
-ul {
16  
-    list-style:none;
17  
-}
18  
-img {
19  
-    border:0;
20  
-}
21  
-.hr { clear:both; float:none; }
22  
-.hr hr { display:none; }
23  
-a {
24  
-    text-decoration:none;
25  
-    color:#69f;
26  
-    outline:none;    
27  
-}
28  
-a:hover {
29  
-    color:#4D81B3;
30  
-}
6  website/static/bitly_chrome_extension_updates.xml
... ...
@@ -1,6 +0,0 @@
1  
-<?xml version="1.0" encoding="UTF-8"?>
2  
-<gupdate xmlns="http://www.google.com/update2/response" protocol="2.0">
3  
-  <app appid="eojncajepdlbofdkeejdpnkdogoommbk">
4  
-    <updatecheck codebase="http://bitly.org/a/bitly_extension.crx" version="0.1.3.3" />
5  
-  </app>
6  
-</gupdate>
BIN  website/static/favicon.ico
Binary file not shown
1  website/static/robots.txt
... ...
@@ -1 +0,0 @@
1  
-# robots are welcome
39  website/templates/index.html
... ...
@@ -1,39 +0,0 @@
1  
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2  
-<html xmlns="http://www.w3.org/1999/xhtml">
3  
-    <head>
4  
-        <title>bit.ly Chrome Extension</title>
5  
-        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6  
-        <link rel="stylesheet" href="{{static_url("base.css")}}" type="text/css" charset="utf-8" />
7  
-        <link rel="icon" type="image/png" href="{{static_url("favicon.ico")}}" />
8  
-    </head>
9  
-    <body>
10  
-        <div id="container">
11  
-            <div id="top">
12  
-
13  
-            </div> <!-- end #top -->
14  
-            
15  
-            <div id="middle">
16  
-            
17  
-                bit.ly Chrome Extension.
18  
-                
19  
-                <p><a href="/install/bitly_chrome_extension.crx">install</a> (current version is {{escape(current_version)}})</p>
20  
-
21  
-            </div> <!-- END #middle -->
22  
-        
23  
-            <div id="bottom">
24  
-
25  
-                <ul>
26  
-                    <li><a href="http://bit.ly/">bit.ly</a></li>
27  
-                    <li><a href="http://labs.bit.ly/">labs.bit.ly</a></li>
28  
-                    <li><a href="http://feedback.bit.ly/">feedback</a></li>
29  
-                    <li><a href="mailto:support%2Bchrome-extension@bit.ly">contact</a></li>
30  
-                    <li><a href="http://bit.ly/pages/privacy">privacy</a></li>
31  
-                </ul>
32  
-
33  
-                © 2010 bit.ly <sup>TM</sup>
34  
-                
35  
-            </div> <!-- end #bottom -->
36  
-            
37  
-        </div> <!-- end #container -->
38  
-    </body>
39  
-</html>
39  website/website.py
... ...
@@ -1,39 +0,0 @@
1  
-import os
2  
-import os.path
3  
-import logging
4  
-import tornado.web
5  
-import tornado.httpserver
6  
-import tornado.ioloop
7  
-import tornado.options
8  
-
9  
-import current_version
10  
-
11  
-class ContentHandler(tornado.web.RequestHandler):
12  
-    def get(self):
13  
-        self.render("index.html", current_version = current_version.__version__)
14  
-
15  
-class Application(tornado.web.Application):
16  
-    def __init__(self):
17  
-        app_settings = {
18  
-            'debug' : False,
19  
-            "template_path" : os.path.join(os.path.dirname(__file__), "templates"),
20  
-            "static_path" : os.path.join(os.path.dirname(__file__), "static"),
21  
-            }
22  
-        handlers = [
23  
-                (r"^/$", ContentHandler),
24  
-                (r"/install/bitly_chrome_extension.crx", tornado.web.RedirectHandler,
25  
-                    dict(url="http://github.com/downloads/bitly/bitly_chrome_extension/bitly_chrome_extension-" + current_version.__version__ + ".crx")),
26  
-                ]
27  
-        tornado.web.Application.__init__(self, handlers, **app_settings)
28  
-
29  
-def main():
30  
-    tornado.options.define("port", default=7995, help="Listen on port", type=int)
31  
-    tornado.options.parse_command_line()
32  
-    logging.info("starting chrome extension website on %s:%d" % ('0.0.0.0', tornado.options.options.port))
33  
-    
34  
-    http_server = tornado.httpserver.HTTPServer(Application())
35  
-    http_server.listen(tornado.options.options.port)
36  
-    tornado.ioloop.IOLoop.instance().start()
37  
-
38  
-if __name__ == "__main__":
39  
-    main()

0 notes on commit d8e6dfa

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