Permalink
Browse files

Signed-off-by: patlockley <patrick.lockley@googlemail.com>

  • Loading branch information...
1 parent 8865547 commit 304663c6e5ad8b3a25416863c2bfcabb5e236352 @pgogy committed May 13, 2012
Showing with 45 additions and 2 deletions.
  1. +1 −1 manifest.json
  2. BIN oa.zip
  3. +44 −1 popup.html
View
2 manifest.json
@@ -16,5 +16,5 @@
"popup": "popup.html"
},
"permissions": [ "tabs", "http://*/*", "https://*/*" ],
- "version": "0.86"
+ "version": "0.87"
}
View
BIN oa.zip
Binary file not shown.
View
45 popup.html
@@ -124,7 +124,7 @@
var page_reveal_segment = document.createElement("FORM");
var page_reveal_segment_button = document.createElement("INPUT");
page_reveal_segment_button.setAttribute("type","button");
- page_reveal_segment_button.setAttribute("onClick","javascript:document.getElementById('extra').style.display='block';");
+ page_reveal_segment_button.setAttribute("onClick","javascript:if(document.getElementById('extra').style.display=='block'){document.getElementById('extra').style.display='none'}else{document.getElementById('extra').style.display='block'};");
page_reveal_segment_button.setAttribute("value","More Information");
page_reveal_segment.appendChild(page_reveal_segment_button);
parent_node.body.appendChild(page_reveal_segment);
@@ -227,6 +227,49 @@
}
+ var all_reveal_segment = document.createElement("FORM");
+ var all_reveal_segment_button = document.createElement("INPUT");
+ all_reveal_segment_button.setAttribute("type","button");
+ all_reveal_segment_button.setAttribute("onClick","javascript:if(document.getElementById('all_data').style.display=='block'){document.getElementById('all_data').style.display='none'}else{document.getElementById('all_data').style.display='block'};");
+ all_reveal_segment_button.setAttribute("value","All Data");
+ all_reveal_segment.appendChild(all_reveal_segment_button);
+ parent_node.body.appendChild(all_reveal_segment);
+
+ var all_holder = document.createElement("DIV");
+ all_holder.style.display="none";
+ all_holder.id = "all_data";
+ parent_node.body.appendChild(all_holder);
+
+ var all_text_title = document.createElement("P");
+ all_text=document.createTextNode("All Data");
+ all_text_title.appendChild(all_text);
+ all_holder.appendChild(all_text_title);
+
+ var csv_title = document.createElement("P");
+ csv_text=document.createTextNode("URL,LICENSE,NAME,ATTRIBUTION_URL,AUTHOR");
+ csv_title.appendChild(csv_text);
+ all_holder.appendChild(csv_title);
+
+
+
+ url_data = bkg.url_cache;
+
+ for(x in url_data){
+
+ if(url_data[x]['license']!=""){
+
+ var data_text = document.createElement("P");
+
+ string = x + "," + url_data[x]['license'] + "," + url_data[x]['license'] + "," + url_data[x]["attributionName"] + "," + url_data[x]["attributionURL"] + url_data[x]["author"];
+
+ url_text=document.createTextNode(string);
+ data_text.appendChild(url_text);
+ all_holder.appendChild(data_text);
+
+ }
+
+ }
+
}
</script>

0 comments on commit 304663c

Please sign in to comment.