var docsyardPanel = document.createElement('div');
var docsyardToggleBtn = document.createElement('button');
window.docsyardIsAlreadyOpened = false;
// Minimize and maximize docsyard panel
function minimizeMaximizePanel() {
var docsyardIframe = document.getElementById("docsyardPanelIframe"),
minimizeMaximizeBtn = document.getElementById('lwMinimizeMaximizeBtn');
if (docsyardIframe.style.height == '500px') {
docsyardIframe.style.height = '0px';
docsyardIframe.style.display = 'none';
minimizeMaximizeBtn.innerHTML = '↗';
} else if (docsyardIframe.style.height == '0px') {
docsyardIframe.style.height = '500px';
docsyardIframe.style.display = 'block';
minimizeMaximizeBtn.innerHTML = '↙';
}
}
function showBackgroundColor(btn) {
btn.style.backgroundColor = '#e2e3e3';
}
function hideBackgroundColor(btn) {
btn.style.backgroundColor = '#ffffff';
}
function showDocsyard(projectSlug, version, articleSlug) {
console.log(window.docsyardIsAlreadyOpened);
if(window.docsyardIsAlreadyOpened) {
return minimizeMaximizePanel();
} else {
var iframeUrl = '';
window.docsyardIsAlreadyOpened = true;
if (articleSlug) {
iframeUrl = "