Merge pull request #2407 from ethereum/script_executor

fix matomo with compile and run
pull/2411/head
yann300 3 years ago committed by GitHub
commit 34d4293f55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      apps/remix-ide/src/app/tabs/compile-and-run.ts

@ -34,11 +34,11 @@ export class CompileAndRun extends Plugin {
e.preventDefault() e.preventDefault()
this.targetFileName = file this.targetFileName = file
await this.call('solidity', 'compile', file) await this.call('solidity', 'compile', file)
_paq.push(['trackEvent', 'ScriptExecutor', 'compile_solidity']) _paq.push(['trackEvent', 'ScriptExecutor', 'CompileAndRun', 'compile_solidity'])
} else if (file.endsWith('.js') || file.endsWith('.ts')) { } else if (file.endsWith('.js') || file.endsWith('.ts')) {
e.preventDefault() e.preventDefault()
this.runScript(file, false) this.runScript(file, false)
_paq.push(['trackEvent', 'ScriptExecutor', 'run_script']) _paq.push(['trackEvent', 'ScriptExecutor', 'CompileAndRun', 'run_script'])
} }
} }
} }
@ -47,7 +47,7 @@ export class CompileAndRun extends Plugin {
runScriptAfterCompilation (fileName: string) { runScriptAfterCompilation (fileName: string) {
this.targetFileName = fileName this.targetFileName = fileName
_paq.push(['trackEvent', 'ScriptExecutor', 'request_run_script']) _paq.push(['trackEvent', 'ScriptExecutor', 'CompileAndRun', 'request_run_script'])
} }
async runScript (fileName, clearAllInstances) { async runScript (fileName, clearAllInstances) {
@ -78,7 +78,7 @@ export class CompileAndRun extends Plugin {
const file = contract.object.devdoc['custom:dev-run-script'] const file = contract.object.devdoc['custom:dev-run-script']
if (file) { if (file) {
this.runScript(file, true) this.runScript(file, true)
_paq.push(['trackEvent', 'ScriptExecutor', 'run_script_after_compile']) _paq.push(['trackEvent', 'ScriptExecutor', 'CompileAndRun', 'run_script_after_compile'])
} else { } else {
this.call('notification', 'toast', 'You have not set a script to run. Set it with @custom:dev-run-script NatSpec tag.') this.call('notification', 'toast', 'You have not set a script to run. Set it with @custom:dev-run-script NatSpec tag.')
} }

Loading…
Cancel
Save