diff --git a/.gitignore b/.gitignore
index 801902a73..23900fae9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,4 +42,4 @@ lib/*
js/copayBundle.js
config.js
webapp
-
+chrome-extension
diff --git a/bower.json b/bower.json
index 80e3c20d3..7197b53f0 100644
--- a/bower.json
+++ b/bower.json
@@ -17,6 +17,7 @@
"crypto-js": "http://crypto-js.googlecode.com/files/CryptoJS%20v3.1.2.zip",
"sjcl": "1.0.0",
"file-saver": "*",
- "qrcode-decoder-js": "*"
+ "qrcode-decoder-js": "*",
+ "bitcore": "~0.1.19"
}
}
diff --git a/ghpages.sh b/ghpages.sh
deleted file mode 100755
index 8aa6e11cd..000000000
--- a/ghpages.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /bin/bash
-
-#Description: A simple script to compile and copy only the needed files for the web app.
-
-# Configs
-APPDIR="webapp"
-LIBDIR="$APPDIR/lib"
-DOWNLOADDIR="$APPDIR/download"
-ZIPFILE="copay_webapp_.zip"
-
-OpenColor="\033["
-Red="1;31m"
-Yellow="1;33m"
-Green="1;32m"
-CloseColor="\033[0m"
-
-# Create/Clean temp dir
-echo -e "${OpenColor}${Green}* Checking temp dir...${CloseColor}"
-if [ -d $APPDIR ]; then
- rm -rf $APPDIR
-fi
-
-mkdir -p $APPDIR
-
-# Generate and copy bitcore bundle
-if [ ! -d node_modules/bitcore ]; then
- echo -e "${OpenColor}${Red}X The node_modules/bitcore dir does not exist. \nRun npm install and try again.${CloseColor}"
- exit 1
-else
- echo -e "${OpenColor}${Green}* Generating bitcore bundle...${CloseColor}"
- cd node_modules/bitcore
- grunt --target=dev shell
- cd ../..
-fi
-
-# Re-compile copayBundle.js
-echo -e "${OpenColor}${Green}* Generating copay bundle...${CloseColor}"
-grunt --target=dev shell
-
-# Copy all app files
-echo -e "${OpenColor}${Green}* Copying all app files...${CloseColor}"
-cp -af {css,font,img,js,lib,config.js,index.html} $APPDIR
-cp -af node_modules/bitcore/browser/bundle.js $LIBDIR/
-mv $LIBDIR/bundle.js $LIBDIR/bitcore.js
-
-echo -e "${OpenColor}${Green}* Zipping all app files...${CloseColor}"
-zip -r $ZIPFILE $APPDIR
-mkdir -p $DOWNLOADDIR
-mv $ZIPFILE $DOWNLOADDIR
-
-echo -e "${OpenColor}${Yellow}\nAwesome! You just need to copy and paste the ./webapp content to your local repository and push it.${CloseColor}"
diff --git a/img/icons/icon.png b/img/icons/icon.png
new file mode 100644
index 000000000..47cdc4b1f
Binary files /dev/null and b/img/icons/icon.png differ
diff --git a/index-download-chrome.html b/index-download-chrome.html
new file mode 100644
index 000000000..675112999
--- /dev/null
+++ b/index-download-chrome.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+ Copay Chrome Extension - Install
+
+
+
+
+
Copay Installation:
+
+ - Download ZIP
+ - Unpack the ZIP file
+ - Navigate to "chrome://extensions" in your browser
+ - Enable Developer Mode
+ - Click "Load unpacked extension" and select the unzipped folder
+ - Copay is installed!
+
+
+
+
diff --git a/index.html b/index.html
index 494a4d4a7..9a3d18c05 100644
--- a/index.html
+++ b/index.html
@@ -1,5 +1,5 @@
-
+
@@ -7,6 +7,7 @@
Copay - Multisignature Wallet
+
@@ -590,7 +591,7 @@
{{title}}
@@ -660,7 +661,7 @@ on supported browsers please check
http://www.w
-
+
diff --git a/js/routes.js b/js/routes.js
index bfc5061d7..301b9d68a 100644
--- a/js/routes.js
+++ b/js/routes.js
@@ -74,4 +74,7 @@ angular
}
}
});
+ })
+ .config(function($compileProvider) {
+ $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel|chrome-extension):/);
});
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 000000000..53a67fa2b
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,19 @@
+{
+ "manifest_version": 2,
+ "name": "Copay",
+ "description": "A multisignature bitcoin wallet",
+ "version": "0.0.1",
+ "homepage_url": "http://bitpay.github.io/copay",
+ "browser_action": {
+ "default_title": "Copay",
+ "default_icon": "img/icons/icon.png",
+ "default_popup": "popup.html"
+ },
+ "permissions": [
+ "tabs", "storage"
+ ],
+ "options_page": "index.html#/settings",
+ "icons": {
+ "128": "img/icons/icon.png"
+ }
+}
diff --git a/popup.html b/popup.html
new file mode 100644
index 000000000..99e584da6
--- /dev/null
+++ b/popup.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+ Copay
+
+
+
+ Open wallet
+
Settings
+
+
diff --git a/util/generate-app-extension.sh b/util/generate-app-extension.sh
new file mode 100755
index 000000000..f065d42e7
--- /dev/null
+++ b/util/generate-app-extension.sh
@@ -0,0 +1,65 @@
+#! /bin/bash
+
+#Description: A simple script to compile and copy only the needed files for the web app.
+
+# Moving to root path
+cd ../
+
+# Configs
+APPDIR="./webapp"
+CHROMEDIR="./chrome-extension"
+
+LIBDIR="$APPDIR/lib"
+DOWNLOADDIR="$APPDIR/download"
+CHROMEDOWNLOADDIR="$DOWNLOADDIR/chrome"
+
+ZIPFILE="copay.zip"
+CHROMEZIPFILE="copay-chrome-extension.zip"
+
+OpenColor="\033["
+Red="1;31m"
+Yellow="1;33m"
+Green="1;32m"
+CloseColor="\033[0m"
+
+# Create/Clean temp dir
+echo -e "${OpenColor}${Green}* Checking temp dir...${CloseColor}"
+if [ -d $APPDIR ]; then
+ rm -rf $APPDIR
+fi
+
+mkdir -p $APPDIR
+
+# Create/Clean chrome-extension dir
+if [ -d $CHROMEDIR ]; then
+ rm -rf $CHROMEDIR
+fi
+
+mkdir -p $CHROMEDIR
+
+# Re-compile copayBundle.js
+echo -e "${OpenColor}${Green}* Generating copay bundle...${CloseColor}"
+grunt --target=dev shell
+
+# Copy all app files
+echo -e "${OpenColor}${Green}* Copying all app files...${CloseColor}"
+cp -af {css,font,img,js,lib,sound,config.js,index.html} $APPDIR
+
+# Copy all chrome-extension files
+echo -e "${OpenColor}${Green}* Copying all chrome-extension files...${CloseColor}"
+cp -af {css,font,img,js,lib,sound,config.js,index.html,popup.html,manifest.json} $CHROMEDIR
+
+# Zipping apps
+echo -e "${OpenColor}${Green}* Zipping all app files...${CloseColor}"
+zip -r $ZIPFILE $APPDIR
+
+# Zipping chrome-extension
+echo -e "${OpenColor}${Green}* Zipping all chrome-extension files...${CloseColor}"
+zip -r $CHROMEZIPFILE $CHROMEDIR
+
+mkdir -p $CHROMEDOWNLOADDIR
+mv $ZIPFILE $DOWNLOADDIR
+mv $CHROMEZIPFILE $CHROMEDOWNLOADDIR
+cp index-download-chrome.html $CHROMEDOWNLOADDIR/index.html
+
+echo -e "${OpenColor}${Yellow}\nAwesome! Now you have the webapp in ./webapp and the chrome extension files in ./webapp/download/.${CloseColor}"