Closed Cthomp7 closed 9 months ago
@Cthomp7 this looks good (functionally speaking), but there are linting issues in the convo file:
/* global utils, NNW */
but should now be /* global NNE */
here's a version that should pass the linter u can copy+paste ;)
/* global NNE */
window.CONVOS['demo-example-maker'] = (self) => {
return [{
id: 'before-loading-json',
content: 'Looks like you want to upload a new example. Are you sure you want to overwrite your current session?',
options: {
'yes!': (e) => {
self._uploadJSON(self.loaded)
e.hide()
},
'load it in a new tab': (e) => {
const l = window.location
const str = JSON.stringify(self.loaded)
const url = `${l.protocol}//${l.host}/?dem=true#example/${NNE._encode(str)}`
window.open(url, '_blank')
},
'oops, no thank you': (e) => e.hide()
}
}]
}
@nbriz Copied and pasted :) Thanks a lot! I have a sticky note that says "make sure your code is up to STANDARD!" Need to get better at remembering that haha
@Cthomp7 i'm still getting the following linting errors:
i'm guessing ur editor might be auto-formatting things when u save, so to avoid too much back/fourth i'm gonna merge this && then just clean it up in one of my next updates :)
Error was coming from line 342
this._text.code = null
. It was unhappy about it being null, so I set it to an empty string. #237Also after choosing
yes!
, I have it hide the convo. The ' e.goTo('loaded-json')' wasn't referencing anything.