Skip to content

Commit

Permalink
I2PSnark: add .asc and .md5 support in textView.js
Browse files Browse the repository at this point in the history
  • Loading branch information
vituperative committed Jan 12, 2025
1 parent 1d0fb5a commit 1355f77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4493,8 +4493,9 @@ else if (postParams.get("setInOrderEnabled") != null) {
boolean isImage = mime.startsWith("image/");
boolean isText = mime.startsWith("text/") || mime.equals("application/javascript") ||
mime.equals("application/json") || mime.equals("application/xml") ||
path.toLowerCase().endsWith(".url") || path.toLowerCase().endsWith(".ini") ||
path.toLowerCase().endsWith(".bat") || path.toLowerCase().endsWith(".sh");
path.toLowerCase().endsWith(".asc") || path.toLowerCase().endsWith(".bat")
path.toLowerCase().endsWith(".ini") || path.toLowerCase().endsWith(".md5") ||
path.toLowerCase().endsWith(".sh") || path.toLowerCase().endsWith(".url");
boolean isPDF = mime.equals("application/pdf");
buf.append("<td class=\"fileIcon");
if (!complete) {buf.append(" volatile");}
Expand Down
2 changes: 1 addition & 1 deletion apps/i2psnark/res/js/textView.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ document.addEventListener("DOMContentLoaded", function () {
const parentDoc = window.parent.document;
const isIframed = doc.documentElement.classList.contains("iframed") || window.parent;
const snarkFileNameLinks = doc.querySelectorAll(":where(" + viewLinks.join(",") + ")");
const supportedFileTypes = new Set(["bat", "css", "csv", "ini", "js", "json", "nfo", "txt", "sh", "srt", "url"]);
const supportedFileTypes = new Set(["asc", "bat", "css", "csv", "ini", "js", "json", "md5", "nfo", "txt", "sh", "srt", "url"]);
const numberedFileExts = new Set(["bat", "css", "ini", "js", "sh"]);
const cssHref = "/i2psnark/.res/textView.css";
const textviewContent = doc.getElementById("textview-content");
Expand Down

0 comments on commit 1355f77

Please sign in to comment.