Last active
June 14, 2023 19:18
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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