Enable / Disable features in settings of Dev Tools - #2146
Conversation
| return; | ||
| } | ||
|
|
||
| if (typeof this.addon.settings !== undefined && !this.addon.settings.get("enableBlockInjector")) { |
There was a problem hiding this comment.
"enableBlockInjector" doesn't seem to be a setting.... along with a couple other of the IDs you used above... athough they were here in this commit: 0b9a0be#diff-8041d88420f8884c0a0060c016c2070a8b46ee0441c40488f49e962b770dbb00R36-R49
There was a problem hiding this comment.
Indeed - These flags don't exist yet - WL said to hang back on these so they will default to enabled for the time-being until key bindings are configurable...
There was a problem hiding this comment.
@griffpatch This check you are doing here always returns true because undefined needs to be a string. Try "undefined" !== undefined in the console.

There was a problem hiding this comment.
but it shouldn't ever be undefined? or am I missing something
There was a problem hiding this comment.
Yes, it is undefined when running the addon through the extension. Remember, the extension and the addon both use the same code.
There was a problem hiding this comment.
ah, so on the extension, all features are always enabled? i got it now
There was a problem hiding this comment.
Yes, it is undefined when running the addon through the extension. Remember, the extension and the addon both use the same code.
Hmm, I just stripped these one - Are they required after all (only with quotes). I was assuming that perhaps they weren't needed anymore.
There was a problem hiding this comment.
Hmm, I just stripped these one - Are they required after all (only with quotes). I was assuming that perhaps they weren't needed anymore.
I would assume that they would be needed because the devtools extension does not support setting, but unless we really wanted to add them, they could be "in-editor" settings, or maybe settings in the browser popup. In the extension, it should be erroring out saying "Cannot read property 'get' of undefined".
There was a problem hiding this comment.
W_L reminded me that there is an alternative, by checking addon.self._isDevtoolsExtension which is true for the devtools extension.
This comment has been minimized.
This comment has been minimized.
- Also remove date & version from help
- Also remove date & version from help
|
Yes let's do that
…On Wed, 14 Apr 2021 at 13:17, TheColaber ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In addons/editor-devtools/DevTools.js
<#2146 (comment)>
:
> @@ -1622,6 +1631,10 @@ export default class DevTools {
return;
}
+ if (typeof this.addon.settings !== undefined && !this.addon.settings.get("enableBlockInjector")) {
W_L reminded me that there is an alternative, by checking
addon.self._isDevtoolsExtension which is true for the devtools extension
<https://github.com/ScratchAddons/DevtoolsExtension/blob/master/inject/run-addon.js#L47>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2146 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTM3PT5VABFSVISI6NRFUDTIWBWRANCNFSM4236PC5A>
.
|
…tom Colors addon makes devtools highlighting not work")
Resolves
Bugfix - Event should have no default background color
Enhancement - Enable / Disable features in settings