From 9442466854ee963e281fcb9dcc1f86cdb1e04f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=CC=81lint=20Szekeres?= Date: Sun, 19 May 2019 22:40:30 +0200 Subject: [PATCH] mouseenter base64 fixes a Safari bug --- public/assets/js/app.js | 11 +++++++---- public/index.html | 9 ++------- public/templates/commands.html | 2 +- resources/scss/_main.scss | 6 ++++++ 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/public/assets/js/app.js b/public/assets/js/app.js index b38f588..6a5d2d4 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -385,6 +385,8 @@ $scope.activeStep = 'download'; + $scope.base64 = ''; + $scope.gzipTypes = 'text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml'; $scope.extensions = { @@ -570,18 +572,19 @@ }); }; - - $scope.copyAsBase64 = function() { + $scope.prepareBase64 = function() { generateZip(function (content) { var reader = new FileReader(); reader.readAsDataURL(content); reader.onloadend = function() { var base64 = reader.result.replace(/^data:.+;base64,/, ''); - $window.document.querySelector('#base64-zip-line').innerHTML = 'echo \'' + base64 + '\' | base64 --decode > /etc/nginx/nginxconfig.io-' + $scope.getDomains().join(',') + '.zip'; - $window.document.querySelector('#btn-base64-zip-line').click(); + + $scope.base64 = 'echo \'' + base64 + '\' | base64 --decode > /etc/nginx/nginxconfig.io-' + $scope.getDomains().join(',') + '.zip'; } }); + }; + $scope.copyAsBase64 = function() { gtag('event', $scope.getDomains().join(','), { event_category: 'download_base64', }); diff --git a/public/index.html b/public/index.html index 9eeda00..e1b98ac 100644 --- a/public/index.html +++ b/public/index.html @@ -1033,14 +1033,9 @@
- -
-
- -
+
+
{{ base64 }}
/etc/nginx/nginx.conf