Skip to content

Instantly share code, notes, and snippets.

@timolehto
Last active April 16, 2018 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timolehto/83e988b7b9b4243f33717cf82c6a332b to your computer and use it in GitHub Desktop.
Save timolehto/83e988b7b9b4243f33717cf82c6a332b to your computer and use it in GitHub Desktop.
var isFullscreen = false
var originaWidths
function toggleFullscreen() {
let outerContainer = document.querySelector('#dialogueChat').style
let innerContainer = document.querySelector('#lekaneBanner_chatContentsContainer').style
if (isFullscreen) {
outerContainer.width = originalWidths.outerContainer
innerContainer.width = originalWidths.innerContainer
} else {
let outerContainer = document.querySelector('#dialogueChat').style
let innerContainer = document.querySelector('#lekaneBanner_chatContentsContainer').style
if (!originaWidths) {
originaWidths = {
outerContainer: outerContainer.width,
innerContainer: innerCongtainer.width
}
}
outerContainer.width = "90%"
innerContainer.width = "100%"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment