diff --git a/build.sh b/build.sh index b29e530..03abb50 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,6 @@ DIST="dist" BROWSERS=("firefox" "opera" "chrome") - for i in "${BROWSERS[@]}" do DIR=$DIST/$i @@ -13,13 +12,15 @@ do echo $DIR/src cp -r src/* $DIR/src - mv $DIR/src/manifest-$i.json $DIR/src/manifest.json - rm -f $DIR/src/manifest-* file="extension.zip" - if [ $i == "firefox" ] - then - file="extension.xpi" + if [ $i == "firefox" ]; then + file="extension.xpi" + elif [ $i == "chrome" ]; then + perl -0pe 's/,\s+"applications": \{(.*?\}){2}//s'\ + $DIR/src/manifest.json > $DIR/src/manifest-chrome.json + rm $DIR/src/manifest.json + mv $DIR/src/manifest-chrome.json $DIR/src/manifest.json fi zip -j $DIR/$file $DIR/src/* diff --git a/src/manifest-chrome.json b/src/manifest-chrome.json deleted file mode 100644 index 0d3ffc3..0000000 --- a/src/manifest-chrome.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "manifest_version": 2, - "name": "burlesco", - "version": "6.0", - "description": "Leia notícias sem ser assinante, burle o paywall", - "homepage_url": "http://burles.co", - "author": "rodorgas", - - "icons": { - "128": "icone.png" - }, - - "background": { - "scripts": ["background.js"] - }, - - "content_scripts": [{ - "js": ["content.js"], - "run_at": "document_idle", - "matches": [ - "*://*.oglobo.globo.com/*", - "*://www.economist.com/*", - "*://foreignpolicy.com/*", - "*://*.folha.uol.com.br/*", - "*://*.folha.com.br/*", - "*://*.ft.com/*", - "*://gauchazh.clicrbs.com.br/*" - ] - }], - - "permissions": [ - "webRequest", - "webRequestBlocking", - "cookies", - - "*://correio.rac.com.br/*", - "*://*.clicrbs.com.br/*", - "*://www.economist.com/*", - "*://*.estadao.com.br/*", - "*://foreignpolicy.com/*", - "*://blockv2.fivewall.com.br/*", - "*://*.folha.uol.com.br/*", - "*://*.folha.com.br/*", - "*://*.ft.com/*", - "*://*.gazetadopovo.com.br/*", - "*://assets.imirante.com/*", - "*://ogjs.infoglobo.com.br/*", - "*://jota.info/*", - "*://www.jornalnh.com.br/*", - "*://*.nexojornal.com.br/*", - "*://*.nyt.com/*", - "*://*.oglobo.globo.com/*", - "*://www.rbsonline.com.br/*", - "*://cdn.tinypass.com/*", - "*://dashboard.tinypass.com/*", - "*://*.washingtonpost.com/*", - "*://*.exame.abril.com.br/*", - "*://super.abril.com.br/*", - "*://veja.abril.com.br/*" - ] -} diff --git a/src/manifest-opera.json b/src/manifest-opera.json deleted file mode 100644 index c78796f..0000000 --- a/src/manifest-opera.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "manifest_version": 2, - "name": "burlesco", - "version": "6.0", - "description": "Leia notícias sem ser assinante, burle o paywall", - "homepage_url": "http://burles.co", - "author": "rodorgas", - - "icons": { - "128": "icone.png" - }, - - "background": { - "scripts": ["background.js"] - }, - - "content_scripts": [{ - "js": ["content.js"], - "run_at": "document_idle", - "matches": [ - "*://*.oglobo.globo.com/*", - "*://www.economist.com/*", - "*://foreignpolicy.com/*", - "*://*.folha.uol.com.br/*", - "*://*.folha.com.br/*", - "*://*.ft.com/*", - "*://gauchazh.clicrbs.com.br/*" - ] - }], - - "permissions": [ - "webRequest", - "webRequestBlocking", - "cookies", - - "*://correio.rac.com.br/*", - "*://dc.clicrbs.com.br/*", - "*://www.economist.com/*", - "*://*.estadao.com.br/*", - "*://foreignpolicy.com/*", - "*://blockv2.fivewall.com.br/*", - "*://*.folha.uol.com.br/*", - "*://*.folha.com.br/*", - "*://*.ft.com/*", - "*://gauchazh.clicrbs.com.br/*", - "*://*.gazetadopovo.com.br/*", - "*://assets.imirante.com/*", - "*://ogjs.infoglobo.com.br/*", - "*://jota.info/*", - "*://jornaldesantacatarina.clicrbs.com.br/*", - "*://www.jornalnh.com.br/*", - "*://*.nexojornal.com.br/*", - "*://*.nyt.com/*", - "*://*.oglobo.globo.com/*", - "*://www.rbsonline.com.br/*", - "*://cdn.tinypass.com/*", - "*://dashboard.tinypass.com/*", - "*://*.washingtonpost.com/*", - "*://*.exame.abril.com.br/*", - "*://super.abril.com.br/*", - "*://veja.abril.com.br/*" - ], - - "applications": { - "gecko": { - "id": "burlesco@burlesco.com" - } - } -} diff --git a/src/manifest-firefox.json b/src/manifest.json similarity index 100% rename from src/manifest-firefox.json rename to src/manifest.json