Skip to content

Instantly share code, notes, and snippets.

@sukov
Created July 5, 2019 20:20
Show Gist options
  • Save sukov/018497669cae3cbbcb20a1802bfe2da1 to your computer and use it in GitHub Desktop.
Save sukov/018497669cae3cbbcb20a1802bfe2da1 to your computer and use it in GitHub Desktop.
App Store Connect / iTunes Connect wider App Screen by hiding navigation. Suggested use with JavaScript injection extension for your browser.
function toggleNavigation() {
var topPane = document.getElementById("appPageHeader");
var leftPane = document.getElementsByClassName("pane-layout-sidebar")[0];
var bottomPane = document.getElementsByClassName("pane-layout-content-header")[0];
var bottomPaneHeader = bottomPane.getElementsByClassName("pane-layout-content-header-text")[0];
var displayType = (topPane.style.display === "none") ? "block" : "none";
topPane.style.display = displayType;
leftPane.style.display = displayType;
//NOTE: Uncomment this line if you want to hide `Save` and `Submit` buttons, and remove the next two lines
// bottomPane.style.display = displayType == "block" ? "flex" : "none";
bottomPane.style.padding = "3px";
bottomPaneHeader.style.display = displayType;
}
function addToggleButton() {
var button = document.createElement("Button");
button.onclick = toggleNavigation;
button.innerHTML = "Toggle";
button.style = "top:8px;right:255px;position:fixed;z-index:99999;";
document.body.appendChild(button);
}
addToggleButton();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment