PageSourceSearch

https://nealsheeran.com/javascripts/pinboard.js

js nealsheeran.com collected 2026-09-27 09:44:31 UTC 1,819 bytes, 56 lines download raw bytes

1function pinboardNS_fetch_script(url) {
2  //document.writeln('<s'+'cript type="text/javascript" src="' + url + '"></s'+'cript>');
3  (function(){
4    var pinboardLinkroll = document.createElement('script');
5    pinboardLinkroll.type = 'text/javascript';
6    pinboardLinkroll.async = true;
7    pinboardLinkroll.src = url;
8    document.getElementsByTagName('head')[0].appendChild(pinboardLinkroll);
9  })();
10}
11
12function pinboardNS_show_bmarks(r) {
13  var lr = new Pinboard_Linkroll();
14  lr.set_items(r);
15  lr.show_bmarks();
16}
17
18function Pinboard_Linkroll() {
19  var items;
20
21  this.set_items = function(i) {
22    this.items = i;
23  }
24  this.show_bmarks = function() {
25    var lines = [];
26    for (var i = 0; i < this.items.length; i++) {
27      var item = this.items[i];
28      var str = this.format_item(item);
29      lines.push(str);
30    }
31    document.getElementById(linkroll).innerHTML = lines.join("\n");
32  }
33  this.cook = function(v) {
34    return v.replace('<', '&lt;').replace('>', '&gt>');
35  }
36
37  this.format_item = function(it) {
38    var str = "<li class=\"pin-item\">";
39    if (!it.d) { return; }
40    str += "<p><a class=\"pin-title\" href=\"" + this.cook(it.u) + "\">" + this.cook(it.d) + "</a>";
41    if (it.n) {
42      str += "<span class=\"pin-description\">" + this.cook(it.n) + "</span>\n";
43    }
44    if (it.t.length > 0) {
45      for (var i = 0; i < it.t.length; i++) {
46        var tag = it.t[i];
47        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> ";
48      }
49    }
50    str += "</p></li>\n";
51    return str;
52  }
53}
54Pinboard_Linkroll.prototype = new Pinboard_Linkroll();
55pinboardNS_fetch_script("http://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count);
56

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.