Browse files

Wow I can actually read the history now

  • Loading branch information...
1 parent 3c9dc02 commit 7f79aef409f637ae29c539cc4c676723307a0ead Geoff Greer committed Sep 24, 2011
Showing with 60 additions and 0 deletions.
  1. +7 −0 README.md
  2. BIN icon.png
  3. BIN icon.pxm
  4. +14 −0 manifest.json
  5. +39 −0 popup.html
View
7 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
View
BIN icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN icon.pxm
Binary file not shown.
View
14 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>"
+ ]
+}
View
39 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.