aboutsummaryrefslogtreecommitdiff
path: root/source/javascripts/pinboard.js
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-06-07 10:45:01 -0400
committerBrandon Mathis <brandon@imathis.com>2011-06-07 10:45:01 -0400
commitd8b796acb9275e74324c3ea04324314ecbe1b664 (patch)
tree475d78d3b5ee9f5bba1bf8147e8368aa9278e4fa /source/javascripts/pinboard.js
parent8698a276f937cb1cd6f67f7f213e2ea438500d7e (diff)
downloadmy_new_personal_website-d8b796acb9275e74324c3ea04324314ecbe1b664.tar.xz
my_new_personal_website-d8b796acb9275e74324c3ea04324314ecbe1b664.zip
Another massive commit:
1. Major improvements to the responsive styling. 2. Toggleable sidebar 3. Upgraded to modernizr 2.0 which includes Respond.js 4. IE7-9 testing and fixes 5. New theming system which should make forkers happy 6. New rake task for installing Octopress themes 7. Magic
Diffstat (limited to 'source/javascripts/pinboard.js')
-rw-r--r--source/javascripts/pinboard.js48
1 files changed, 0 insertions, 48 deletions
diff --git a/source/javascripts/pinboard.js b/source/javascripts/pinboard.js
deleted file mode 100644
index cff7ccc4..00000000
--- a/source/javascripts/pinboard.js
+++ /dev/null
@@ -1,48 +0,0 @@
-function pinboardNS_fetch_script(url) {
- console.log(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();
-}
-
-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).replace(/^\s+|\s+$/g, '') + "</a> ";
- }
- }
- str += "</p></li>\n";
- return str;
- }
-}
-Pinboard_Linkroll.prototype = new Pinboard_Linkroll();