aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/pinboard.js
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-05-30 00:30:16 -0400
committerBrandon Mathis <brandon@imathis.com>2011-05-30 00:30:16 -0400
commit8698a276f937cb1cd6f67f7f213e2ea438500d7e (patch)
tree3963ed8f9750cd565087ce54fe8de38d9f5c606d /public/javascripts/pinboard.js
parentc7d5365f81552cae16bbb91696ca3e67b4a0a2e9 (diff)
downloadmy_new_personal_website-8698a276f937cb1cd6f67f7f213e2ea438500d7e.tar.xz
my_new_personal_website-8698a276f937cb1cd6f67f7f213e2ea438500d7e.zip
Cleaned out public from repository, updated gitignore, added syntax
highlighting tests, improved syntax highlighting and styling of pre blocks. Overriding dynamic gist styling. Added a plugin for pygments caching which should speed things up terrifically. added ender.js as a lightweight way of scripting the DOM, events, etc. Some general typography and semantic html improvements.
Diffstat (limited to 'public/javascripts/pinboard.js')
-rw-r--r--public/javascripts/pinboard.js52
1 files changed, 0 insertions, 52 deletions
diff --git a/public/javascripts/pinboard.js b/public/javascripts/pinboard.js
deleted file mode 100644
index 9a69e0a6..00000000
--- a/public/javascripts/pinboard.js
+++ /dev/null
@@ -1,52 +0,0 @@
-var count = pinboard_count;
-var linkroll = 'pinboard_linkroll';
-function pinboardNS_fetch_script(url) {
- document.writeln('<s'+'cript type="text/javascript" src="' + url + '"></s'+'cript>');
-}
-
-function pinboardNS_show_bmarks(r) {
- var lr = new Pinboard_Linkroll();
- lr.set_items(r);
- lr.show_bmarks();
-}
-
-var json_URL = "http://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count=" + count;
-pinboardNS_fetch_script(json_URL);
-
-function Pinboard_Linkroll() {
- var items;
-
- this.set_items = function(i) {
- this.items = i;
- }
- this.show_bmarks = function() {
- var lines = [];
- for (var i = 0; i < this.items.length; i++) {
- var item = this.items[i];
- var str = this.format_item(item);
- lines.push(str);
- }
- document.getElementById(linkroll).innerHTML = lines.join("\n");
- }
- this.cook = function(v) {
- return v.replace('<', '&lt;').replace('>', '&gt>');
- }
-
- this.format_item = function(it) {
- var str = "<li class=\"pin-item\">";
- if (!it.d) { return; }
- str += "<p><a class=\"pin-title\" href=\"" + this.cook(it.u) + "\">" + this.cook(it.d) + "</a>";
- if (it.n) {
- str += "<span class=\"pin-description\">" + this.cook(it.n) + "</span>\n";
- }
- if (it.t.length > 0) {
- for (var i = 0; i < it.t.length; i++) {
- var tag = it.t[i];
- str += " <a class=\"pin-tag\" href=\"http://pinboard.in/u:"+ this.cook(it.a) + "/t:" + this.cook(tag) + "\">" + this.cook(tag) + "</a> ";
- }
- }
- str += "</p></li>\n";
- return str;
- }
-}
-Pinboard_Linkroll.prototype = new Pinboard_Linkroll();