PageSourceSearch

https://caztro.com/pdf-library.js

js caztro.com collected 2026-10-04 07:38:40 UTC 673 bytes, 31 lines download raw bytes

1(()=>{
2'use strict';
3/*
4  Shared PDF lookup used by Publications and Selected Work.
5  Reads window.PAPERS from papers.js.
6*/
7window.PDFLibrary={
8  normalizeDOI(doi){
9    return String(doi||"")
10      .trim()
11      .replace(/^https?:\/\/(dx\.)?doi\.org\//i,"")
12      .toLowerCase();
13  },
14  find(doi){
15    if(!doi || !window.PAPERS) return null;
16    const key=this.normalizeDOI(doi);
17    const entry=window.PAPERS[key];
18    if(!entry || !entry.file) return null;
19    const labels={
20      preprint:"PREPRINT",
21      pdf:"PDF",
22      accepted:"AUTHOR MANUSCRIPT"
23    };
24    return {
25      url:`papers/${entry.file}`,
26      label:labels[entry.type] || "PDF"
27    };
28  }
29};
30
31})();

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.