ntdservices commited on
Commit
b6677b2
Β·
verified Β·
1 Parent(s): 9ef7cd9

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +15 -6
templates/index.html CHANGED
@@ -186,14 +186,17 @@
186
  <li>
187
  <p>{{ r.text }}</p>
188
  <div class="tools">
189
- <button type="button" class="smallbtn" onclick="openContext({{ r.idx }})" title="Open full context sidebar">πŸ”Ž View context</button>
190
 
191
- <!-- Clipboard icon: copies the 2nd line of the source file -->
192
- <button type="button" class="iconbtn" onclick="copySecond({{ r.idx }}, this)" title="Copy 2nd line of this file">πŸ“‹</button>
193
 
194
- <!-- File name label -->
195
- <span class="filetag">πŸ“„ {{ r.file }}</span>
196
- </div>
 
 
 
197
  </li>
198
  {% endfor %}
199
  </ol>
@@ -377,6 +380,12 @@
377
  alert("Clipboard error: " + e.message);
378
  }
379
  }
 
 
 
 
 
 
380
  </script>
381
  </body>
382
  </html>
 
186
  <li>
187
  <p>{{ r.text }}</p>
188
  <div class="tools">
189
+ <button type="button" class="smallbtn" onclick="openContext({{ r.idx }})" title="Open full context sidebar">πŸ”Ž View context</button>
190
 
191
+ <!-- Clipboard icon: copies the 2nd line of the source file -->
192
+ <button type="button" class="iconbtn" onclick="copySecond({{ r.idx }}, this)" title="Copy 2nd line of this file">πŸ“‹</button>
193
 
194
+ <!-- Link icon: opens the 2nd line of the source file in new tab -->
195
+ <button type="button" class="iconbtn" onclick="openLink({{ r.idx }})" title="Open URL in new tab">πŸ”—</button>
196
+
197
+ <!-- File name label -->
198
+ <span class="filetag">πŸ“„ {{ r.file }}</span>
199
+ </div>
200
  </li>
201
  {% endfor %}
202
  </ol>
 
380
  alert("Clipboard error: " + e.message);
381
  }
382
  }
383
+ function openLink(idx) {
384
+ const meta = window.PARA_META[idx];
385
+ if (meta && meta.second) {
386
+ window.open(meta.second, "_blank");
387
+ }
388
+ }
389
  </script>
390
  </body>
391
  </html>