From 491ffb1c1feb83d3ddb3a9f7501213911b83d19c Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 11 Dec 2014 16:17:28 -0300 Subject: [PATCH] rm firefox extension support --- browser-extensions/firefox/README.md | 13 ----- browser-extensions/firefox/build.sh | 69 ------------------------- browser-extensions/firefox/lib/main.js | 43 --------------- browser-extensions/firefox/package.json | 11 ---- package.json | 5 +- 5 files changed, 2 insertions(+), 139 deletions(-) delete mode 100644 browser-extensions/firefox/README.md delete mode 100644 browser-extensions/firefox/build.sh delete mode 100644 browser-extensions/firefox/lib/main.js delete mode 100644 browser-extensions/firefox/package.json diff --git a/browser-extensions/firefox/README.md b/browser-extensions/firefox/README.md deleted file mode 100644 index 7a92f11e7..000000000 --- a/browser-extensions/firefox/README.md +++ /dev/null @@ -1,13 +0,0 @@ -System Requirements - -* Download [Add-on SDK](https://addons.mozilla.org/en-US/developers/builder) -* Install it. [Mozilla Docs](https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Installation) - -Run - -``` -$ sh firefox/build.sh -``` - -- Copy the content of *firefox/firefox-addon* (lib, data, package.json) to your development path. -- Compile the XPI file [Mozilla Docs](https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Getting_started) diff --git a/browser-extensions/firefox/build.sh b/browser-extensions/firefox/build.sh deleted file mode 100644 index 6c9867c78..000000000 --- a/browser-extensions/firefox/build.sh +++ /dev/null @@ -1,69 +0,0 @@ -#! /bin/bash - -# Description: This script compiles and copy the needed files to later package the application for Firefox - -OpenColor="\033[" -Red="1;31m" -Yellow="1;33m" -Green="1;32m" -CloseColor="\033[0m" - -# Check function OK -checkOK() { - if [ $? != 0 ]; then - echo "${OpenColor}${Red}* ERROR. Exiting...${CloseColor}" - exit 1 - fi -} - -# Configs -BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -APPDIR="$BUILDDIR/firefox-addon" -ZIPFILE="copay-firefox-addon.zip" -VERSION=`cut -d '"' -f2 $BUILDDIR/../../version.js|head -n 1` - - -cfx >/dev/null -checkOK - -# Move to the build directory -cd $BUILDDIR - -# Create/Clean temp dir -echo "${OpenColor}${Green}* Checking temp dir...${CloseColor}" -if [ -d $APPDIR ]; then - rm -rf $APPDIR -fi -mkdir -p $APPDIR - -# Re-compile copayBundle.js -echo "${OpenColor}${Green}* Generating copay bundle...${CloseColor}" -grunt --target=dev shell -checkOK - -# Copy all chrome-extension files -echo "${OpenColor}${Green}* Copying all firefox-addon files...${CloseColor}" - -sed "s/APP_VERSION/$VERSION/g" "$BUILDDIR/../../package.json" > $APPDIR/package.json -checkOK - -INCLUDE=`cat ../include` -echo $INCLUDE -cd $BUILDDIR/../.. -LIBS=`cat index.html |grep -o -E 'src="([^"#]+)"' | cut -d'"' -f2|grep lib` -echo "LIBS: $LIBS" - -CMD="rsync -rLRv --exclude-from $BUILDDIR/../exclude $INCLUDE $LIBS $APPDIR/data" -echo $CMD -$CMD -checkOK - -rm -Rf $BUILDDIR/data -mv $APPDIR/data $BUILDDIR -checkOK - -cd $BUILDDIR -cfx xpi -checkOK - -echo "${OpenColor}${Yellow}\nThe Firefox add-on is ready at $BUILDDIR/copay.xpi!${CloseColor}" diff --git a/browser-extensions/firefox/lib/main.js b/browser-extensions/firefox/lib/main.js deleted file mode 100644 index c5a200d3f..000000000 --- a/browser-extensions/firefox/lib/main.js +++ /dev/null @@ -1,43 +0,0 @@ -var { ToggleButton } = require('sdk/ui/button/toggle'); -var panels = require('sdk/panel'); -var self = require('sdk/self'); - -var panelScript = "window.addEventListener('click', function(event) {" + - " var t = event.target;" + - " if (t.nodeName == 'A')" + - " self.port.emit('click-link');" + - "}, false);" - -var button = ToggleButton({ - id: 'copay-addon', - label: 'Copay', - icon: { - '16': './img/icons/icon-16.png', - '32': './img/icons/icon-32.png', - '64': './img/icons/icon-64.png' - }, - onChange: handleChange -}); - -var panel = panels.Panel({ - contentURL: self.data.url('popup.html'), - contentScript: panelScript, - onHide: handleHide, - height: 150 -}); - -function handleChange(state) { - if (state.checked) { - panel.show({ - position: button - }); - } -} - -function handleHide() { - button.state('window', {checked: false}); -} - -panel.port.on('click-link', function(url) { - panel.hide(); -}); diff --git a/browser-extensions/firefox/package.json b/browser-extensions/firefox/package.json deleted file mode 100644 index 75b8e80ef..000000000 --- a/browser-extensions/firefox/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "copay", - "title": "Copay", - "id": "copay@bitpay", - "description": "A multisignature Bitcoin wallet", - "icon": "data/img/icons/icon.png", - "author": "Mario Colque ", - "license": "MIT", - "version": "APP_VERSION" -} - diff --git a/package.json b/package.json index 15f47fd87..8899978f3 100644 --- a/package.json +++ b/package.json @@ -36,12 +36,11 @@ "test": "sh test/run.sh", "dist": "node shell/scripts/dist.js", "shell": "node shell/scripts/launch.js", - "firefox": "source browser-extensions/firefox/build.sh", "chrome": "source browser-extensions/chrome/build.sh", "setup-shell": "node shell/scripts/download-atom-shell.js", "postinstall": "./node_modules/.bin/grunt", - "sign": "gpg -u 1112CFA1 --output browser-extensions/firefox/copay.xpi.sig --detach-sig browser-extensions/firefox/copay.xpi; gpg -u 1112CFA1 --output browser-extensions/chrome/copay-chrome-extension.zip.sig --detach-sig browser-extensions/chrome/copay-chrome-extension.zip", - "verify": "gpg --verify browser-extensions/firefox/copay.xpi.sig browser-extensions/firefox/copay.xpi; gpg --verify browser-extensions/chrome/copay-chrome-extension.zip.sig browser-extensions/chrome/copay-chrome-extension.zip", + "sign": "gpg -u 1112CFA1 --output browser-extensions/chrome/copay-chrome-extension.zip.sig --detach-sig browser-extensions/chrome/copay-chrome-extension.zip", + "verify": "gpg --verify browser-extensions/chrome/copay-chrome-extension.zip.sig browser-extensions/chrome/copay-chrome-extension.zip", "ios": "cordova/build.sh && cd cordova/project && cordova build ios && open platforms/ios/Copay.xcodeproj" }, "devDependencies": {