Skip to content

Instantly share code, notes, and snippets.

@pfelipm
Last active June 14, 2023 19:18
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 pfelipm/2f79435f5b7787cd834bc5b157e7c452 to your computer and use it in GitHub Desktop.
Save pfelipm/2f79435f5b7787cd834bc5b157e7c452 to your computer and use it in GitHub Desktop.
Four bookmarklets to toggle / shrink / resize the left panel (and top section) of the Google Apps Script IDE
// Create a new bookmark in your browser using any of these URLs | @pfelipm 06/02/23
// Demo: https://twitter.com/pfelipm/status/1622395953721364481
// 1. Toggles the side panel out of view
javascript:(function() {const style = document.querySelector('div[jsname="Iq1FLd"]').style;if (style.display == 'none') style.display = '';else style.display = 'none';})()
// 2. Allows the side panel to shrink down to 150px when resizing window
javascript:(function() {const style = document.querySelector('div[jsname="Iq1FLd"]').style;if (style.minWidth == "150px") style.minWidth = "225px";else style.minWidth = "150px";})()
// 3. Resizes the side panel to the width specified by a JS prompt
javascript:(function() {const style = document.querySelector('div[jsname="Iq1FLd"]').style;const width = prompt('Input width in px (default: 225):', style.flexBasis.slice(0, -2));if (width < 225) style.minWidth = width + 'px';style.flexBasis = width + 'px';})()
// 4. Toggles both the side panel and the top section (logo, name of script, deploy button...) out of view
javascript:(function() {const styleLeft = document.querySelector('div[jsname="Iq1FLd"]').style;const styleTop = document.querySelector('header').style;if (styleLeft.display == 'none') { styleLeft.display = '';styleTop.display = '';}else { styleLeft.display = 'none'; styleTop.display = 'none';}})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment