Skip to content

Commit

Permalink
Optional tabs (#812)
Browse files Browse the repository at this point in the history
* chore(deps-dev): bump puppeteer from 13.7.0 to 14.3.0

Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 13.7.0 to 14.3.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](puppeteer/puppeteer@v13.7.0...v14.3.0)

---
updated-dependencies:
- dependency-name: puppeteer
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* All tabs are now optional

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
NiedziolkaMichal and dependabot[bot] authored Aug 31, 2022
1 parent 54c2d4c commit 00bc9b0
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions editor/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,19 @@
* }
*/
function getOutput() {
var editorContents = {
htmlContent: tabby.editors.html.editor.getValue(),
cssContent: tabby.editors.css.editor.getValue(),
};

// not all editor instances have a JS panel
if (tabby.editors.js.editor) {
editorContents.jsContent = tabby.editors.js.editor.getValue();
}
var editorContents = {};

setContent("htmlContent", "html");
setContent("cssContent", "css");
setContent("jsContent", "js");

function setContent(propertyName, editorName) {
if (tabby.editors[editorName].editor) {
editorContents[propertyName] = tabby.editors[editorName].editor.getValue();
} else {
editorContents[propertyName] = "";
}
}
return editorContents;
}

Expand Down

0 comments on commit 00bc9b0

Please sign in to comment.