aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-01-04 03:23:27 +0800
committerKevin Serrano <kevgagser@gmail.com>2017-01-04 03:23:27 +0800
commit68be5240195ba31a5b66e21857d2c409d3f7ea2e (patch)
treeba87011ea446991355959f2ed1c11b715b6dc73a
parentb93cdd428b5013787f78a266bcb5ca84d26b9941 (diff)
downloadtangerine-wallet-browser-68be5240195ba31a5b66e21857d2c409d3f7ea2e.tar
tangerine-wallet-browser-68be5240195ba31a5b66e21857d2c409d3f7ea2e.tar.gz
tangerine-wallet-browser-68be5240195ba31a5b66e21857d2c409d3f7ea2e.tar.bz2
tangerine-wallet-browser-68be5240195ba31a5b66e21857d2c409d3f7ea2e.tar.lz
tangerine-wallet-browser-68be5240195ba31a5b66e21857d2c409d3f7ea2e.tar.xz
tangerine-wallet-browser-68be5240195ba31a5b66e21857d2c409d3f7ea2e.tar.zst
tangerine-wallet-browser-68be5240195ba31a5b66e21857d2c409d3f7ea2e.zip
Take out unneeded permissions from the app.
-rw-r--r--app/manifest.json2
-rw-r--r--gulpfile.js30
2 files changed, 28 insertions, 4 deletions
diff --git a/app/manifest.json b/app/manifest.json
index 61775ed93..95dcfc31a 100644
--- a/app/manifest.json
+++ b/app/manifest.json
@@ -56,9 +56,7 @@
],
"permissions": [
"storage",
- "tabs",
"clipboardWrite",
- "clipboardRead",
"http://localhost:8545/"
],
"web_accessible_resources": [
diff --git a/gulpfile.js b/gulpfile.js
index 26ad0c1f8..ca69b36a8 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -46,6 +46,7 @@ gulp.task('copy:locales', copyTask({
'./dist/firefox/_locales',
'./dist/chrome/_locales',
'./dist/edge/_locales',
+ './dist/opera/_locales',
]
}))
gulp.task('copy:images', copyTask({
@@ -54,6 +55,7 @@ gulp.task('copy:images', copyTask({
'./dist/firefox/images',
'./dist/chrome/images',
'./dist/edge/images',
+ './dist/opera/images',
],
}))
gulp.task('copy:fonts', copyTask({
@@ -62,6 +64,7 @@ gulp.task('copy:fonts', copyTask({
'./dist/firefox/fonts',
'./dist/chrome/fonts',
'./dist/edge/fonts',
+ './dist/opera/fonts',
],
}))
gulp.task('copy:reload', copyTask({
@@ -70,6 +73,7 @@ gulp.task('copy:reload', copyTask({
'./dist/firefox/scripts',
'./dist/chrome/scripts',
'./dist/edge/scripts',
+ './dist/opera/scripts',
],
pattern: '/chromereload.js',
}))
@@ -79,6 +83,7 @@ gulp.task('copy:root', copyTask({
'./dist/firefox',
'./dist/chrome',
'./dist/edge',
+ './dist/opera',
],
pattern: '/*',
}))
@@ -92,6 +97,21 @@ gulp.task('manifest:chrome', function() {
.pipe(gulp.dest('./dist/chrome', { overwrite: true }))
})
+gulp.task('manifest:opera', function() {
+ return gulp.src('./dist/opera/manifest.json')
+ .pipe(jsoneditor(function(json) {
+ json.permissions = [
+ "storage",
+ "tabs",
+ "clipboardWrite",
+ "clipboardRead",
+ "http://localhost:8545/"
+ ]
+ return json
+ }))
+ .pipe(gulp.dest('./dist/opera', { overwrite: true }))
+})
+
gulp.task('manifest:production', function() {
return gulp.src([
'./dist/firefox/manifest.json',
@@ -118,7 +138,7 @@ if (!disableLiveReload) {
copyStrings.push('copy:reload')
}
-gulp.task('copy', gulp.series(gulp.parallel(...copyStrings), 'manifest:production', 'manifest:chrome'))
+gulp.task('copy', gulp.series(gulp.parallel(...copyStrings), 'manifest:production', 'manifest:chrome', 'manifest:opera'))
gulp.task('copy:watch', function(){
gulp.watch(['./app/{_locales,images}/*', './app/scripts/chromereload.js', './app/*.{html,json}'], gulp.series('copy'))
})
@@ -188,7 +208,12 @@ gulp.task('zip:edge', () => {
.pipe(zip(`metamask-edge-${manifest.version}.zip`))
.pipe(gulp.dest('builds'));
})
-gulp.task('zip', gulp.parallel('zip:chrome', 'zip:firefox', 'zip:edge'))
+gulp.task('zip:opera', () => {
+ return gulp.src('dist/opera/**')
+ .pipe(zip(`metamask-opera-${manifest.version}.zip`))
+ .pipe(gulp.dest('builds'));
+})
+gulp.task('zip', gulp.parallel('zip:chrome', 'zip:firefox', 'zip:edge', 'zip:opera'))
// high level tasks
@@ -255,6 +280,7 @@ function bundleTask(opts) {
.pipe(gulp.dest('./dist/firefox/scripts'))
.pipe(gulp.dest('./dist/chrome/scripts'))
.pipe(gulp.dest('./dist/edge/scripts'))
+ .pipe(gulp.dest('./dist/opera/scripts'))
.pipe(gulpif(!disableLiveReload,livereload()))
)