How to download Embedded Google Slide Presentations (published to the web)

Last Edit (18.03.2021)

Quickly to the point, I searched & failed to find a nifty way to save an embedded Google Slide Presentation last night. The only way that reportedly seems to work, didn’t work either.

So if you are in a hurry, all this involves is creating a couple of bookmarks.

Create a bookmark & name it ‘Open Google Slides’ & in the URL part, copy :

var n = document.querySelectorAll('iframe[src*=docs\\.google]')[0],
k = document.createElement("a");
k.innerText = "Open Google Slides";

Similarly, Create another one & name it ‘Extract Slides’ with the URL part as:

var atag = "punch-viewer-content",
btag = "-caption",
ctag = "aria-setsize",
dtag = "aria-posinset",
msvg = document.getElementsByTagName("svg"),
node = document.querySelectorAll('[class$="' + btag + '"]')[0],
view = document.getElementsByClassName(atag)[0],
size = node.getAttribute(ctag),
data = "",
func = () => {
data += msvg[0].outerHTML;
if((i = node.getAttribute(dtag))==size) document.write(data);
else, setTimeout(func,10)

Done. Now open the page with the embedded google slide & click the first bookmark. It should create a link “Open Google Slides” above the slides.

Clicking it should open the embedded presentation in a new tab. Now click the second bookmark. This should expand the page which you can simply save & use offline.

No plugins or apps. The next time you need to save an embedded presentation, simply use the two bookmarks.

The code snippets above are simple. The first one creates a link to the presentation & the second one expands the slides on the page, manually triggering the click on each slide.

Happy to hear if there is an easier way to do this in the comments.

Thanks for reading.

Founder @ Jetbrain Robotics

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store