amitness commited on
Commit
fc5e6e2
·
1 Parent(s): d385c48

update docs

Browse files
Files changed (1) hide show
  1. static/index.html +57 -0
static/index.html CHANGED
@@ -49,6 +49,44 @@
49
  .badges img {
50
  height: 20px;
51
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  </style>
53
  </head>
54
 
@@ -66,6 +104,25 @@
66
  alt="Chrome Web Store Rating">
67
  </a>
68
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  </div>
70
  </body>
71
  </html>
 
49
  .badges img {
50
  height: 20px;
51
  }
52
+
53
+ .api-docs {
54
+ margin-top: 40px;
55
+ padding: 20px;
56
+ text-align: left;
57
+ border-top: 1px solid #e0e0e0;
58
+ }
59
+
60
+ .api-docs h2 {
61
+ font-size: 1.5rem;
62
+ margin-bottom: 15px;
63
+ }
64
+
65
+ .api-docs p {
66
+ margin-bottom: 10px;
67
+ line-height: 1.6;
68
+ }
69
+
70
+ .api-docs code {
71
+ background: #f5f5f5;
72
+ padding: 2px 6px;
73
+ border-radius: 3px;
74
+ font-family: 'Courier New', monospace;
75
+ font-size: 0.9em;
76
+ }
77
+
78
+ .api-docs pre {
79
+ background: #f5f5f5;
80
+ padding: 15px;
81
+ border-radius: 5px;
82
+ overflow-x: auto;
83
+ margin: 15px 0;
84
+ }
85
+
86
+ .api-docs pre code {
87
+ background: none;
88
+ padding: 0;
89
+ }
90
  </style>
91
  </head>
92
 
 
104
  alt="Chrome Web Store Rating">
105
  </a>
106
  </div>
107
+ <div class="api-docs">
108
+ <h2>API Usage</h2>
109
+ <p>The browser extension uses this backend API to convert arXiv papers for Overleaf:</p>
110
+
111
+ <p><strong>Backend URL:</strong> <code>https://amitness-open-in-overleaf.hf.space</code></p>
112
+
113
+ <p><strong>How it works:</strong></p>
114
+ <pre><code>// 1. Extension detects arXiv page
115
+ // 2. Constructs Overleaf import URL
116
+ var url = "https://www.overleaf.com/docs?snip_uri=" +
117
+ BACKEND_URL + "/fetch_tar?arxiv_url=" +
118
+ encodeURIComponent(arxivPageURL);
119
+
120
+ // 3. Adds "Open in Overleaf" button to arXiv page
121
+ // 4. Clicking button redirects to Overleaf with the source</code></pre>
122
+
123
+ <p><strong>Endpoint:</strong> <code>GET /fetch_tar?arxiv_url={arxiv_url}</code></p>
124
+ <p>Returns a tarball of the LaTeX source that Overleaf can import directly.</p>
125
+ </div>
126
  </div>
127
  </body>
128
  </html>