Skip to content

Instantly share code, notes, and snippets.

@msakamoto-sf
Last active August 29, 2015 14:04
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 msakamoto-sf/28b0c297d4e1965fe983 to your computer and use it in GitHub Desktop.
Save msakamoto-sf/28b0c297d4e1965fe983 to your computer and use it in GitHub Desktop.
Convert google drive image file edit url to viewer mode url. (see http://googlesystem.blogspot.jp/2013/02/permalinks-for-google-drive-images.html )
javascript:void(function(){if (window.location.href.match(new RegExp("file/d/(\\w+)/edit"))) { var n = "http://drive.google.com/uc?export=view&id=" + RegExp.$1; prompt("url", n); } else { prompt("not google drive image edit url. see:", "http://googlesystem.blogspot.jp/2013/02/permalinks-for-google-drive-images.html"); }}())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment