adblock-plus-crx
Advanced tools
Comparing version
var fs = require('fs') | ||
var path = require('path') | ||
var filename = 'Adblock-Plus_v1.11.crx' | ||
var version = require('./package.json')['adblock-plus-crx'].version | ||
var filename = 'Adblock-Plus_v' + version + '.crx' | ||
@@ -5,0 +6,0 @@ module.exports = { |
{ | ||
"name": "adblock-plus-crx", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Adblock-Plus crx base64 encoded binary for chromedriver", | ||
@@ -9,2 +9,5 @@ "main": "index.js", | ||
}, | ||
"adblock-plus-crx": { | ||
"version": "1.12.4" | ||
}, | ||
"keywords": [ | ||
@@ -34,3 +37,6 @@ "Adblock-Plus", | ||
}, | ||
"homepage": "https://github.com/guidesmiths/adblock-plus-crx#readme" | ||
"homepage": "https://github.com/guidesmiths/adblock-plus-crx#readme", | ||
"dependencies": { | ||
"mocha": "^3.2.0" | ||
} | ||
} |
@@ -44,2 +44,28 @@ # Adblock-Plus.crx | ||
# How do make your own crx (instructions for OSX) | ||
1. Use a clean directory | ||
``` | ||
mkdir -p ~/Downloads/Adblock-Plus/1.12.4 | ||
cd ~/Downloads/Adblock-Plus/1.12.4 | ||
``` | ||
1. Download the crx file from adblockplus.org | ||
```bash | ||
curl https://downloads.adblockplus.org/adblockpluschrome-1.12.4.crx -o Adblock-Plus_v1.12.4.crx | ||
``` | ||
1. Unzip the crx | ||
``` | ||
unzip Adblock-Plus_v1.12.4.crx | ||
``` | ||
1. Make your modifications | ||
``` | ||
sed -i '' -e 's/defaults.suppress_first_run_page = false;/defaults.suppress_first_run_page = true;/' lib/adblockplus.js | ||
``` | ||
1. Rezip the crx (-u --update doesn't work for me) | ||
``` | ||
zip Adblock-Plus_v1.12.4.crx . -r | ||
``` |
@@ -6,7 +6,7 @@ var assert = require('assert') | ||
it('should expose the crx binary path', function() { | ||
assert(new RegExp('/adblock-plus-crx/bin/Adblock-Plus_v1.11.crx$').test(abp.path), 'crx path was incorrect') | ||
assert(new RegExp('/adblock-plus-crx/bin/Adblock-Plus_v.+\.crx$').test(abp.path), 'crx path was incorrect') | ||
}) | ||
it('should base64 encode the crx binary', function() { | ||
assert(/=$/.test(abp.base64()), 'crx was not base64 encoded') | ||
assert(/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/.test(abp.base64()), 'crx was not base64 encoded') | ||
}) | ||
}) |
8
14.29%21
5%71
57.78%554259
-9.89%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added