Last week I talked about switching a Google Drive document from
/preview and back. The process is cumbersome, requiring you to edit the address of the document.
Don’t fear the bookmarklet
To use the bookmarklet, you’ll need to turn on the Bookmarks bar in your browser. Look under the view menu, or through your appearance settings.
Once you have the bookmark bar showing, drag the following link to the bar (don’t just click on it, click and hold so you can drag it to the bar).
Copy the following code (start with the j and including everything up to the final ;):
Now, right-click on the
SwitchMode bookmarklet in the bookmarks bar and select
edit. Replace the current URL with the above code that you copied.
Testing it out
Now, open a Google document, for example, here is a Google Slides document you can use. Once the document is loaded in the browser, click the SwitchMode bookmarklet. The view of the document will switch between /edit and /preview every time you click the bookmarklet.
There is no error checking in the script. I don’t see how it could mess anything up, but don’t go clicking the bookmarklet on non-Google documents sites.