Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

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