summarylogtreecommitdiffstats
path: root/remove-analytics.patch
diff options
context:
space:
mode:
Diffstat (limited to 'remove-analytics.patch')
-rw-r--r--remove-analytics.patch271
1 files changed, 175 insertions, 96 deletions
diff --git a/remove-analytics.patch b/remove-analytics.patch
index 5da8ef5d0ba3..b89ad5eef8fe 100644
--- a/remove-analytics.patch
+++ b/remove-analytics.patch
@@ -1,34 +1,35 @@
-diff -ura a/browser/lib/newNote.js b/browser/lib/newNote.js
---- a/browser/lib/newNote.js 2019-07-24 09:57:04.000000000 +0200
-+++ b/browser/lib/newNote.js 2019-07-24 13:57:08.414057570 +0200
-@@ -1,13 +1,9 @@
+diff --color -ura a/browser/lib/newNote.js b/browser/lib/newNote.js
+--- a/browser/lib/newNote.js 2020-09-04 16:47:01.000000000 +0200
++++ b/browser/lib/newNote.js 2020-09-12 09:52:20.544253351 +0200
+@@ -1,6 +1,5 @@
import dataApi from 'browser/main/lib/dataApi'
import ee from 'browser/main/lib/eventEmitter'
-import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
import queryString from 'query-string'
import { push } from 'connected-react-router'
- export function createMarkdownNote (storage, folder, dispatch, location, params, config) {
+@@ -12,8 +11,6 @@
+ params,
+ config
+ ) {
- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_MARKDOWN')
- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_ALLNOTE')
--
- let tags = []
- if (config.ui.tagNewNoteWithFilteringTags && location.pathname.match(/\/tags/)) {
- tags = params.tagname.split(' ')
-@@ -39,9 +35,6 @@
- }
- export function createSnippetNote (storage, folder, dispatch, location, params, config) {
+ let tags = []
+ if (
+@@ -58,8 +55,6 @@
+ params,
+ config
+ ) {
- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_SNIPPET')
- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_ALLNOTE')
--
+
let tags = []
- if (config.ui.tagNewNoteWithFilteringTags && location.pathname.match(/\/tags/)) {
- tags = params.tagname.split(' ')
-diff -ura a/browser/main/Detail/MarkdownNoteDetail.js b/browser/main/Detail/MarkdownNoteDetail.js
---- a/browser/main/Detail/MarkdownNoteDetail.js 2019-07-24 09:57:04.000000000 +0200
-+++ b/browser/main/Detail/MarkdownNoteDetail.js 2019-07-24 13:57:27.137375800 +0200
-@@ -14,7 +14,6 @@
+ if (
+diff --color -ura a/browser/main/Detail/MarkdownNoteDetail.js b/browser/main/Detail/MarkdownNoteDetail.js
+--- a/browser/main/Detail/MarkdownNoteDetail.js 2020-09-04 16:47:01.000000000 +0200
++++ b/browser/main/Detail/MarkdownNoteDetail.js 2020-09-12 09:53:15.814946778 +0200
+@@ -15,7 +15,6 @@
import StatusBar from '../StatusBar'
import _ from 'lodash'
import { findNoteTitle } from 'browser/lib/findNoteTitle'
@@ -36,50 +37,52 @@ diff -ura a/browser/main/Detail/MarkdownNoteDetail.js b/browser/main/Detail/Mark
import ConfigManager from 'browser/main/lib/ConfigManager'
import TrashButton from './TrashButton'
import FullscreenButton from './FullscreenButton'
-@@ -147,7 +146,6 @@
- type: 'UPDATE_NOTE',
- note: note
- })
-- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('EDIT_NOTE')
+@@ -166,7 +165,6 @@
+ type: 'UPDATE_NOTE',
+ note: note
})
+- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('EDIT_NOTE')
+ })
}
-@@ -187,7 +185,6 @@
+@@ -210,8 +208,6 @@
- handleStarButtonClick (e) {
+ handleStarButtonClick(e) {
const { note } = this.state
-- if (!note.isStarred) AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_STAR')
+- if (!note.isStarred)
+- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_STAR')
note.isStarred = !note.isStarred
-diff -ura a/browser/main/Detail/SnippetNoteDetail.js b/browser/main/Detail/SnippetNoteDetail.js
---- a/browser/main/Detail/SnippetNoteDetail.js 2019-07-24 09:57:04.000000000 +0200
-+++ b/browser/main/Detail/SnippetNoteDetail.js 2019-07-24 13:58:25.634026721 +0200
+diff --color -ura a/browser/main/Detail/SnippetNoteDetail.js b/browser/main/Detail/SnippetNoteDetail.js
+--- a/browser/main/Detail/SnippetNoteDetail.js 2020-09-04 16:47:01.000000000 +0200
++++ b/browser/main/Detail/SnippetNoteDetail.js 2020-09-12 09:54:03.845549553 +0200
@@ -17,7 +17,6 @@
import ConfigManager from 'browser/main/lib/ConfigManager'
import _ from 'lodash'
- import {findNoteTitle} from 'browser/lib/findNoteTitle'
+ import { findNoteTitle } from 'browser/lib/findNoteTitle'
-import AwsMobileAnalyticsConfig from 'browser/main/lib/AwsMobileAnalyticsConfig'
import FullscreenButton from './FullscreenButton'
import TrashButton from './TrashButton'
import RestoreButton from './RestoreButton'
-@@ -142,7 +141,6 @@
- type: 'UPDATE_NOTE',
- note: note
- })
-- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('EDIT_NOTE')
+@@ -162,7 +161,6 @@
+ type: 'UPDATE_NOTE',
+ note: note
})
+- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('EDIT_NOTE')
+ })
}
-@@ -181,7 +179,6 @@
+@@ -206,8 +204,6 @@
- handleStarButtonClick (e) {
+ handleStarButtonClick(e) {
const { note } = this.state
-- if (!note.isStarred) AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_STAR')
+- if (!note.isStarred)
+- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_STAR')
note.isStarred = !note.isStarred
-@@ -377,9 +374,6 @@
+@@ -420,9 +416,6 @@
const mode = syntax != null ? syntax.name : null
if (mode != null) {
snippets[index].mode = mode
@@ -87,12 +90,12 @@ diff -ura a/browser/main/Detail/SnippetNoteDetail.js b/browser/main/Detail/Snipp
- name: mode
- })
}
- this.setState(state => ({note: Object.assign(state.note, {snippets: snippets})}))
-
-@@ -401,10 +395,6 @@
- }), () => {
- this.save()
- })
+ this.setState(state => ({
+ note: Object.assign(state.note, { snippets: snippets })
+@@ -454,10 +447,6 @@
+ this.save()
+ }
+ )
-
- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('SELECT_LANG', {
- name
@@ -100,9 +103,9 @@ diff -ura a/browser/main/Detail/SnippetNoteDetail.js b/browser/main/Detail/Snipp
}
}
-diff -ura a/browser/main/Detail/TagSelect.js b/browser/main/Detail/TagSelect.js
---- a/browser/main/Detail/TagSelect.js 2019-07-24 09:57:04.000000000 +0200
-+++ b/browser/main/Detail/TagSelect.js 2019-07-24 13:58:39.224029489 +0200
+diff --color -ura a/browser/main/Detail/TagSelect.js b/browser/main/Detail/TagSelect.js
+--- a/browser/main/Detail/TagSelect.js 2020-09-04 16:47:01.000000000 +0200
++++ b/browser/main/Detail/TagSelect.js 2020-09-12 09:54:23.255793194 +0200
@@ -4,7 +4,6 @@
import CSSModules from 'browser/lib/CSSModules'
import styles from './TagSelect.styl'
@@ -111,18 +114,18 @@ diff -ura a/browser/main/Detail/TagSelect.js b/browser/main/Detail/TagSelect.js
import i18n from 'browser/lib/i18n'
import ee from 'browser/main/lib/eventEmitter'
import Autosuggest from 'react-autosuggest'
-@@ -28,8 +27,6 @@
+@@ -34,8 +33,6 @@
}
- addNewTag (newTag) {
+ addNewTag(newTag) {
- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_TAG')
-
newTag = newTag.trim().replace(/ +/g, '_')
if (newTag.charAt(0) === '#') {
newTag.substring(1)
-diff -ura a/browser/main/Main.js b/browser/main/Main.js
---- a/browser/main/Main.js 2019-07-24 09:57:04.000000000 +0200
-+++ b/browser/main/Main.js 2019-07-24 13:58:52.030700863 +0200
+diff --color -ura a/browser/main/Main.js b/browser/main/Main.js
+--- a/browser/main/Main.js 2020-09-04 16:47:01.000000000 +0200
++++ b/browser/main/Main.js 2020-09-12 09:52:38.484478405 +0200
@@ -10,7 +10,6 @@
import dataApi from 'browser/main/lib/dataApi'
import _ from 'lodash'
@@ -131,8 +134,8 @@ diff -ura a/browser/main/Main.js b/browser/main/Main.js
import eventEmitter from 'browser/main/lib/eventEmitter'
import { store } from 'browser/main/store'
import i18n from 'browser/lib/i18n'
-@@ -25,10 +24,6 @@
- constructor (props) {
+@@ -27,10 +26,6 @@
+ constructor(props) {
super(props)
- if (process.env.NODE_ENV === 'production') {
@@ -142,9 +145,9 @@ diff -ura a/browser/main/Main.js b/browser/main/Main.js
const { config } = props
this.state = {
-diff -ura a/browser/main/modals/CreateFolderModal.js b/browser/main/modals/CreateFolderModal.js
---- a/browser/main/modals/CreateFolderModal.js 2019-07-24 09:57:04.000000000 +0200
-+++ b/browser/main/modals/CreateFolderModal.js 2019-07-24 13:59:13.474046496 +0200
+diff --color -ura a/browser/main/modals/CreateFolderModal.js b/browser/main/modals/CreateFolderModal.js
+--- a/browser/main/modals/CreateFolderModal.js 2020-09-04 16:47:01.000000000 +0200
++++ b/browser/main/modals/CreateFolderModal.js 2020-09-12 09:54:41.586023299 +0200
@@ -6,7 +6,6 @@
import { store } from 'browser/main/store'
import consts from 'browser/lib/consts'
@@ -156,14 +159,14 @@ diff -ura a/browser/main/modals/CreateFolderModal.js b/browser/main/modals/Creat
@@ -51,7 +50,6 @@
}
- confirm () {
+ confirm() {
- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_FOLDER')
if (this.state.name.trim().length > 0) {
const { storage } = this.props
const input = {
-diff -ura a/browser/main/modals/PreferencesModal/InfoTab.js b/browser/main/modals/PreferencesModal/InfoTab.js
---- a/browser/main/modals/PreferencesModal/InfoTab.js 2019-07-24 09:57:04.000000000 +0200
-+++ b/browser/main/modals/PreferencesModal/InfoTab.js 2019-07-24 14:00:04.644096990 +0200
+diff --color -ura a/browser/main/modals/PreferencesModal/InfoTab.js b/browser/main/modals/PreferencesModal/InfoTab.js
+--- a/browser/main/modals/PreferencesModal/InfoTab.js 2020-09-04 16:47:01.000000000 +0200
++++ b/browser/main/modals/PreferencesModal/InfoTab.js 2020-09-12 09:57:44.078315155 +0200
@@ -3,7 +3,6 @@
import styles from './InfoTab.styl'
import ConfigManager from 'browser/main/lib/ConfigManager'
@@ -172,11 +175,24 @@ diff -ura a/browser/main/modals/PreferencesModal/InfoTab.js b/browser/main/modal
import _ from 'lodash'
import i18n from 'browser/lib/i18n'
-@@ -31,41 +30,6 @@
- this.setState({ config: newConfig })
+@@ -28,12 +27,6 @@
+ e.preventDefault()
+ }
+
+- handleConfigChange(e) {
+- const newConfig = { amaEnabled: this.refs.amaEnabled.checked }
+-
+- this.setState({ config: newConfig })
+- }
+-
+ handleSubscriptionFormSubmit(e) {
+ e.preventDefault()
+ this.setState({
+@@ -76,36 +69,6 @@
+ })
}
-- handleSaveButtonClick (e) {
+- handleSaveButtonClick(e) {
- const newConfig = {
- amaEnabled: this.state.config.amaEnabled
- }
@@ -188,7 +204,7 @@ diff -ura a/browser/main/modals/PreferencesModal/InfoTab.js b/browser/main/modal
- })
- } else {
- this.setState({
-- amaMessage: i18n.__('Thank\'s for trusting us')
+- amaMessage: i18n.__("Thank's for trusting us")
- })
- }
-
@@ -206,41 +222,66 @@ diff -ura a/browser/main/modals/PreferencesModal/InfoTab.js b/browser/main/modal
- })
- }
-
-- infoMessage () {
+ toggleAutoUpdate() {
+ const newConfig = {
+ autoUpdateEnabled: !this.state.config.autoUpdateEnabled
+@@ -115,11 +78,6 @@
+ ConfigManager.set(newConfig)
+ }
+
+- infoMessage() {
- const { amaMessage } = this.state
- return amaMessage ? <p styleName='policy-confirm'>{amaMessage}</p> : null
- }
-
- render () {
+ render() {
return (
<div styleName='root'>
-@@ -139,23 +103,6 @@
- {i18n.__('License: GPL v3')}
- </li>
- </ul>
--
-- <hr styleName='separate-line' />
+@@ -268,41 +226,6 @@
+ </div>
+
+ <hr styleName='separate-line' />
-
- <div styleName='group-header2--sub'>{i18n.__('Analytics')}</div>
-- <div>{i18n.__('Boostnote collects anonymous data for the sole purpose of improving the application, and strictly does not collect any personal information such the contents of your notes.')}</div>
-- <div>{i18n.__('You can see how it works on ')}<a href='https://github.com/BoostIO/Boostnote' onClick={(e) => this.handleLinkClick(e)}>GitHub</a>.</div>
+- <div>
+- {i18n.__(
+- 'Boostnote collects anonymous data for the sole purpose of improving the application, and strictly does not collect any personal information such the contents of your notes.'
+- )}
+- </div>
+- <div>
+- {i18n.__('You can see how it works on ')}
+- <a
+- href='https://github.com/BoostIO/Boostnote'
+- onClick={e => this.handleLinkClick(e)}
+- >
+- GitHub
+- </a>
+- .
+- </div>
- <br />
- <div>{i18n.__('You can choose to enable or disable this option.')}</div>
-- <input onChange={(e) => this.handleConfigChange(e)}
+- <input
+- onChange={e => this.handleConfigChange(e)}
- checked={this.state.config.amaEnabled}
- ref='amaEnabled'
- type='checkbox'
- />
-- {i18n.__('Enable analytics to help improve Boostnote')}<br />
-- <button styleName='policy-submit' onClick={(e) => this.handleSaveButtonClick(e)}>{i18n.__('Save')}</button>
+- {i18n.__('Enable analytics to help improve Boostnote')}
+- <br />
+- <button
+- styleName='policy-submit'
+- onClick={e => this.handleSaveButtonClick(e)}
+- >
+- {i18n.__('Save')}
+- </button>
- <br />
- {this.infoMessage()}
</div>
)
}
-diff -ura a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js
---- a/browser/main/NoteList/index.js 2019-07-24 09:57:04.000000000 +0200
-+++ b/browser/main/NoteList/index.js 2019-07-24 14:00:26.257460071 +0200
+diff --color -ura a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js
+--- a/browser/main/NoteList/index.js 2020-09-04 16:47:01.000000000 +0200
++++ b/browser/main/NoteList/index.js 2020-09-12 09:58:32.588924649 +0200
@@ -16,7 +16,6 @@
import path from 'path'
import { push, replace } from 'connected-react-router'
@@ -249,27 +290,27 @@ diff -ura a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js
import Markdown from '../../lib/markdown'
import i18n from 'browser/lib/i18n'
import { confirmDeleteNote } from 'browser/lib/confirmDeleteNote'
-@@ -716,7 +715,6 @@
- note: newNote
+@@ -876,7 +875,6 @@
+ note: newNote
+ })
})
+- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('EDIT_NOTE')
})
-- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('EDIT_NOTE')
- })
- .then(() => ee.emit('list:next'))
- .catch((err) => {
-@@ -735,8 +733,6 @@
- const firstNote = selectedNotes[0]
- const eventName = firstNote.type === 'MARKDOWN_NOTE' ? 'ADD_MARKDOWN' : 'ADD_SNIPPET'
+ .then(() => ee.emit('list:next'))
+ .catch(err => {
+@@ -896,8 +894,6 @@
+ const eventName =
+ firstNote.type === 'MARKDOWN_NOTE' ? 'ADD_MARKDOWN' : 'ADD_SNIPPET'
- AwsMobileAnalyticsConfig.recordDynamicCustomEvent(eventName)
- AwsMobileAnalyticsConfig.recordDynamicCustomEvent('ADD_ALLNOTE')
dataApi
.createNote(storage.key, {
type: firstNote.type,
-diff -ura a/package.json b/package.json
---- a/package.json 2019-07-24 09:57:04.000000000 +0200
-+++ b/package.json 2019-07-24 14:01:00.480850050 +0200
-@@ -54,8 +54,6 @@
+diff --color -ura a/package.json b/package.json
+--- a/package.json 2020-09-04 16:47:01.000000000 +0200
++++ b/package.json 2020-09-12 09:51:30.223622230 +0200
+@@ -56,8 +56,6 @@
"@rokt33r/markdown-it-math": "^4.0.1",
"@rokt33r/season": "^5.3.0",
"@susisu/mte-kernel": "^2.0.0",
@@ -278,3 +319,41 @@ diff -ura a/package.json b/package.json
"chart.js": "^2.7.2",
"codemirror": "^5.40.2",
"codemirror-mode-elixir": "^1.1.1",
+diff --color -ura a/yarn.lock b/yarn.lock
+--- a/yarn.lock 2020-09-04 16:47:01.000000000 +0200
++++ b/yarn.lock 2020-09-12 09:52:01.884019291 +0200
+@@ -632,34 +632,6 @@
+ unique-temp-dir "^1.0.0"
+ update-notifier "^2.3.0"
+
+-aws-sdk-mobile-analytics@^0.9.2:
+- version "0.9.2"
+- resolved "https://registry.yarnpkg.com/aws-sdk-mobile-analytics/-/aws-sdk-mobile-analytics-0.9.2.tgz#b56a6e5206fc8c3975a19170b41536c53f6d5d91"
+- dependencies:
+- aws-sdk ">=2.2.37"
+-
+-aws-sdk@>=2.2.37, aws-sdk@^2.48.0:
+- version "2.247.1"
+- resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.247.1.tgz#be5f220d40665ac91d3a84a51f029fa05560c4ee"
+- dependencies:
+- buffer "4.9.1"
+- events "1.1.1"
+- ieee754 "1.1.8"
+- jmespath "0.15.0"
+- querystring "0.2.0"
+- sax "1.2.1"
+- url "0.10.3"
+- uuid "3.1.0"
+- xml2js "0.4.17"
+-
+-aws-sign2@~0.7.0:
+- version "0.7.0"
+- resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
+-
+-aws4@^1.6.0:
+- version "1.7.0"
+- resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289"
+-
+ babel-code-frame@^6.16.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"