Skip to content

Instantly share code, notes, and snippets.

@almet
Created June 17, 2020 17:06
Show Gist options
  • Save almet/6e23c172288f4b0ca69a1efc9d943bcc to your computer and use it in GitHub Desktop.
Save almet/6e23c172288f4b0ca69a1efc9d943bcc to your computer and use it in GitHub Desktop.
Export google timeline info as text.
javascript:(function(){
var distance = document.getElementsByClassName('top-activity-text')[0].innerText;
var date = document.getElementsByClassName('timeline-subtitle')[0].innerText;
var locations = Array.from(document.getElementsByClassName('place-visit-title')).map(e => e.innerText);
var markup = `
<div id="output">
<h1>Livraisons du ${date}</h1>
<input type="text" />
<p>${distance}</p>
<p><em>Lieux : ${ locations.join(', ')}</em>
</div>
`;
document.body.innerHTML = markup;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment