Skip to content

Commit

Permalink
Wow I can actually read the history now
Browse files Browse the repository at this point in the history
  • Loading branch information
Geoff Greer committed Sep 24, 2011
1 parent 3c9dc02 commit 7f79aef
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
@@ -0,0 +1,7 @@
Inspired by http://www.collisiondetection.net/mt/archives/2011/09/how_did_you_fin.php and http://www.theatlantic.com/magazine/archive/1945/07/as-we-may-think/3881/1/?single_page=true

this extension becomes more useful over time. the more trails there are, the more likely one will come in handy

todo: build initial import tool that uses browser history to build trails

note: what about links from IM clients, IRC, etc? hard to keep track of those with a browser extension
Binary file added icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon.pxm
Binary file not shown.
14 changes: 14 additions & 0 deletions manifest.json
@@ -0,0 +1,14 @@
{
"name": "Memex trails",
"version": "0.1",
"description": "Adds Vannevar Bush's trails to your browser.",
"browser_action": {
"default_icon": "icon.png",
"popup": "popup.html"
},
"permissions": [
"tabs",
"history",
"<all_urls>"
]
}
39 changes: 39 additions & 0 deletions popup.html
@@ -0,0 +1,39 @@
<style>
body {
min-width: 200px;
overflow-x: hidden;
}

img {
margin:5px;
border:2px solid black;
vertical-align:middle;
width:75px;
height:75px;
}
</style>

<script>
function show_history(visits) {
if (visits.length > 0) {
document.body.innerHTML = "";
}
else {
document.body.innerHTML = "NOOOOOTHING";
}
for (var i=0; i<visits.length; i++) {
visit = visits[i];
console.log(visit);
var result = "visit " + visit.id + " referer " + visit.referringVisitId + " transition " + visit.transition;
document.body.innerHTML += result;
}
}

chrome.tabs.getSelected(null, function(tab) {
var details = new Object();
details.url = tab.url;//"http://wiki.puella-magi.net/";//window.location.href;
console.log("tab url: " + details.url);
chrome.history.getVisits(details, show_history);
});

</script>

0 comments on commit 7f79aef

Please sign in to comment.