Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions apps/remix-ide/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,19 +361,31 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
settings
])

const queryParams = new QueryParams()
const params = queryParams.get()

const onAcceptMatomo = () => {
_paq.push(['forgetUserOptOut'])
// @TODO remove next line when https://github.com/matomo-org/matomo/commit/9e10a150585522ca30ecdd275007a882a70c6df5 is used
document.cookie = 'mtm_consent_removed=; expires=Thu, 01 Jan 1970 00:00:01 GMT;'
settings.updateMatomoAnalyticsChoice(true)
const el = document.getElementById('modal-dialog')
el.parentElement.removeChild(el)
startWalkthroughService()
}
const onDeclineMatomo = () => {
settings.updateMatomoAnalyticsChoice(false)
_paq.push(['optUserOut'])
const el = document.getElementById('modal-dialog')
el.parentElement.removeChild(el)
startWalkthroughService()
}

const startWalkthroughService = () => {
const walkthroughService = new WalkthroughService(localStorage)
if (!params.code && !params.url && !params.minimizeterminal && !params.gist && !params.minimizesidepanel) {
walkthroughService.start()
}
}

// Ask to opt in to Matomo for remix, remix-alpha and remix-beta
Expand Down Expand Up @@ -469,9 +481,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
await appManager.activatePlugin(['settings'])
await appManager.activatePlugin(['hiddenPanel', 'pluginManager', 'filePanel', 'contextualListener', 'terminal', 'fetchAndCompile', 'contentImport'])

const queryParams = new QueryParams()
const params = queryParams.get()

// Set workspace after initial activation
if (Array.isArray(workspace)) {
appManager.activatePlugin(workspace).then(async () => {
Expand Down Expand Up @@ -506,8 +515,5 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
if (params.embed) framingService.embed()
framingService.start(params)

const walkthroughService = new WalkthroughService(localStorage)
if (!params.code) {
walkthroughService.start()
}
startWalkthroughService()
}