Merge pull request 'Render inline file permalinks' (#2669) from Mai-Lapyst/forgejo:markup-add-filepreview into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2669 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
commit
2e744dc991
25 changed files with 577 additions and 4 deletions
|
@ -7,8 +7,8 @@ export function initUnicodeEscapeButton() {
|
|||
|
||||
e.preventDefault();
|
||||
|
||||
const fileContent = btn.closest('.file-content, .non-diff-file-content');
|
||||
const fileView = fileContent?.querySelectorAll('.file-code, .file-view');
|
||||
const fileContent = btn.closest('.file-content, .non-diff-file-content, .file-preview-box');
|
||||
const fileView = fileContent?.querySelectorAll('.file-code, .file-view, .file-preview');
|
||||
if (btn.matches('.escape-button')) {
|
||||
for (const el of fileView) el.classList.add('unicode-escaped');
|
||||
hideElem(btn);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue