Last active
August 29, 2015 14:19
-
-
Save RadGH/f992407fc42a41e696ce to your computer and use it in GitHub Desktop.
Download images from "Earth View from Google Maps"
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
// Allows downloading the background image from the "Earth View from Google Maps" extension for Chrome: | |
// https://chrome.google.com/webstore/detail/earth-view-from-google-ma/bhloflhklmhfpedakmangadcdofhnnoh | |
// | |
// HOW TO USE: | |
// 1. Open a new tab to see your earth view, preferably something you want to download. | |
// 2. Open the javascript console (Ctrl+Shift+J). Note that the regular inspector may freeze due to the large data-uri, so you must go straight to the javascript console. | |
// 3. Paste the following code to the console, which will create a download link above the earth icon in the corner: | |
// 4. Image will open in a new tab when you click the link. You can then save it. | |
var link = document.createElement('a'); | |
link.appendChild( document.createTextNode( "Open Image" ) ); | |
link.href = $('.background').style["background-image"].replace(/(^url\(|\)\;?$)/g, ''); | |
link.target = "_blank"; | |
link.setAttribute('style', 'position: absolute; right: 20px; bottom: 110px'); | |
document.getElementsByClassName('content')[0].appendChild( link ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bookmarklet version: