diff --git a/README.md b/README.md index c98e386..fe72315 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Smartsheet +# Smartsheet Electron app _This app is not affiliated to Smartsheet Inc._ diff --git a/analytics.js b/analytics.js index b366a65..15a054c 100644 --- a/analytics.js +++ b/analytics.js @@ -1,4 +1,4 @@ -const uuidV4 = require('uuid/v4'); +const uuidV4 = require('./uuidv4'); const ID = 'UA-107704260-1'; @@ -26,7 +26,6 @@ module.exports = { fetch(`${base}&${params.join('&')}`) .then((response, body) => { if (response && response.status === 200) { - console.log(response); this.saveClientID(tempId); } }) diff --git a/browser.js b/browser.js index f478e10..8a7c95d 100644 --- a/browser.js +++ b/browser.js @@ -5,7 +5,7 @@ const isLoading = false; onload = function() { const webview = document.querySelector('webview'); - const css = fs.readFileSync(path.join(__dirname, 'assets', 'overwrite.css')); + const css = fs.readFileSync(path.join(__dirname, 'assets/overwrite.css')); document.querySelector('#back').onclick = function() { webview.goBack(); diff --git a/package.json b/package.json index 7698992..8b47049 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,5 @@ "electron": "~1.7.8", "electron-packager": "^9.1.0", "electron-reload": "^1.2.2" - }, - "dependencies": { - "uuid": "^3.1.0" } } diff --git a/uuidv4.js b/uuidv4.js new file mode 100644 index 0000000..cc3c743 --- /dev/null +++ b/uuidv4.js @@ -0,0 +1,14 @@ +module.exports = () => { + var uuid = "", i, random; + + for (i = 0; i < 32; i++) { + random = Math.random() * 16 | 0; + + if (i == 8 || i == 12 || i == 16 || i == 20) { + uuid += "-" + } + uuid += (i == 12 ? 4 : (i == 16 ? (random & 3 | 8) : random)).toString(16); + } + + return uuid; +}; diff --git a/yarn.lock b/yarn.lock index a2cb8c8..aeace11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -385,13 +385,6 @@ electron-download@^4.0.0: semver "^5.3.0" sumchecker "^2.0.1" -electron-google-analytics@^0.0.17: - version "0.0.17" - resolved "https://registry.yarnpkg.com/electron-google-analytics/-/electron-google-analytics-0.0.17.tgz#c79e9821780c3b96d1c28aa926797894e42de63f" - dependencies: - request "^2.81.0" - uuid "^3.1.0" - electron-osx-sign@^0.4.1: version "0.4.7" resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.4.7.tgz#1d75647a82748eacd48bea70616ec83ffade3ee5" @@ -1488,7 +1481,7 @@ request@2.81.0: tunnel-agent "^0.6.0" uuid "^3.0.0" -request@^2.45.0, request@^2.79.0, request@^2.81.0, request@^2.83.0: +request@^2.45.0, request@^2.79.0: version "2.83.0" resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" dependencies: