Commit 5c8fd602 authored by lianahus's avatar lianahus Committed by ioedeveloper

solidity as active plugin when code is loaded from url param

parent 4eb2a09d
...@@ -495,8 +495,13 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -495,8 +495,13 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
console.log(e) console.log(e)
} }
if (params.code) {
// if code is given in url we focus on solidity plugin
menuicons.select('solidity')
} else {
// If plugins are loaded from the URL params, we focus on the last one. // If plugins are loaded from the URL params, we focus on the last one.
if (pluginLoader.current === 'queryParams' && workspace.length > 0) menuicons.select(workspace[workspace.length - 1]) if (pluginLoader.current === 'queryParams' && workspace.length > 0) menuicons.select(workspace[workspace.length - 1])
}
if (params.call) { if (params.call) {
const callDetails = params.call.split('//') const callDetails = params.call.split('//')
...@@ -516,7 +521,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org ...@@ -516,7 +521,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
const framingService = new FramingService(sidePanel, menuicons, mainview, this._components.resizeFeature) const framingService = new FramingService(sidePanel, menuicons, mainview, this._components.resizeFeature)
if (params.embed) framingService.embed() if (params.embed) framingService.embed()
if (params.code) framingService.code()
framingService.start(params) framingService.start(params)
if (params.code) frameingService.code()
} }
...@@ -41,8 +41,4 @@ export class FramingService { ...@@ -41,8 +41,4 @@ export class FramingService {
this.mainView.minimizeTerminal() this.mainView.minimizeTerminal()
this.resizeFeature.hidePanel() this.resizeFeature.hidePanel()
} }
code () {
this.verticalIcons.select('solidity')
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment