Selecting and publishing a function from a web source

I’m finding this ability to embed prettified source code a google site gadget or iframe really useful. The other day I added the ability to get and publish source code directly from a url (in addition to gists, google apps script source, scriptdb etc), and since it all uses the same google apps script module, you can of course select individual functions from with an html or js source file.

For example,  this shows only the code for the function ‘butGetHref‘ from the the maze of html and javascript in the url given

https://storage.googleapis.com/toasty/p/gaspubcontainer.html?module=https://storage.googleapis.com/toasty/b/but.html&func=butGetHref&source=web

 

and gives this,

The GAS module that does this actually uses Google Caching as well, so that’s probably a good thing too. For more details see the Excel Liberation site.

About brucemcp 225 Articles
I am a Google Developer Expert and decided to investigate Google Apps Script in my spare time. The more I investigated the more content I created so this site is extremely rich. Now, in 2019, a lot of things have disappeared or don’t work anymore due to Google having retired some stuff. I am however leaving things as is and where I came across some deprecated stuff, I have indicated it. I decided to write a book about it and to also create videos to teach developers who want to learn Google Apps Script. If you find the material contained in this site useful, you can support me by buying my books and or videos.