{"id":38598312,"url":"https://github.com/nfd-parser/nfd-preview","last_synced_at":"2026-01-17T08:31:22.064Z","repository":{"id":272568398,"uuid":"917038962","full_name":"nfd-parser/nfd-preview","owner":"nfd-parser","description":"netdisk-fast-download解析预览前端 fork by https://gitee.com/raingad/j-preview","archived":false,"fork":false,"pushed_at":"2025-10-20T03:48:33.000Z","size":21204,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T07:33:23.673Z","etag":null,"topics":["preview","preview-video"],"latest_commit_sha":null,"homepage":"https://nfd-parser.github.io/nfd-preview/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nfd-parser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-15T08:33:59.000Z","updated_at":"2025-10-20T03:48:37.000Z","dependencies_parsed_at":"2025-02-28T00:29:24.175Z","dependency_job_id":"68615ec6-7af2-43c3-9a26-643efc4fc642","html_url":"https://github.com/nfd-parser/nfd-preview","commit_stats":null,"previous_names":["nfd-parser/nfd-preview"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nfd-parser/nfd-preview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfd-parser%2Fnfd-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfd-parser%2Fnfd-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfd-parser%2Fnfd-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfd-parser%2Fnfd-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfd-parser","download_url":"https://codeload.github.com/nfd-parser/nfd-preview/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfd-parser%2Fnfd-preview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["preview","preview-video"],"created_at":"2026-01-17T08:31:21.436Z","updated_at":"2026-01-17T08:31:22.056Z","avatar_url":"https://github.com/nfd-parser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netdisk-fast-download预览模块 jPreview实现\n\n# jPreview\nfork https://gitee.com/raingad/j-preview\n#### 介绍\n一款纯JQ实现的预览插件，支持office文档，图片，音乐，视频，pdf等常用的文件！部分不支持的文档采用officeOnline在线预览。\n\n支持doc、docx、ppt、pptx、wps、xls、xlsx、pdf、mp4、mp3、jpg、png、markdown、txt等常用的文件。\n支持源码文件(js、cpp、java等)高亮展示。\n\n其他文件支持持续更新中...\n\n#### 软件架构\n\n```html\njpreview/\n    ├─source         # 预览资源库，使用时只需要使用static文件内的内容即可\n    ├─static         # 静态资源库\n    │  └─jPreview.js # 核心文件\n    ├─index.html     # demo\n    └─preview.html   # 实现预览的页面\n```\n\n\n\n#### 使用说明\n\n1.  引入Jquery，和主文件\n``` html\n\u003c!-- css --\u003e\n\u003clink rel=\"stylesheet\" href=\"static/common/css/main.css\"\u003e\n\u003clink rel=\"stylesheet\" href=\"static/common/css/audio.css\"\u003e\n\u003clink rel=\"stylesheet\" href=\"static/luckysheet/css/pluginsCss.css\"\u003e\n\u003clink rel=\"stylesheet\" href=\"static/luckysheet/css/plugins.css\"\u003e\n\u003clink rel=\"stylesheet\" href=\"static/luckysheet/css/luckysheet.css\"\u003e\n\u003clink rel=\"stylesheet\" href=\"static/luckysheet/css/iconfont.css\"\u003e\n\u003clink rel=\"stylesheet\" href=\"static/pptxjs/css/pptxjs.css\"\u003e\n\u003clink rel=\"stylesheet\" href=\"static/viewer/viewer.css\"\u003e\n\n\u003c!-- js --\u003e\n\u003cscript type=\"text/javascript\" src=\"static/common/js/jquery-2.0.3.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"static/common/js/jPreview.js\"\u003e\u003c/script\u003e\n```\n2.  初始化\n\n```javascript\njPreview.preview({\n    container:\"container\", // 容器id\n    staticPath:\"./static\", // 静态资源路径\n    url:\"\", // 预览资源路径，没有的话获取url中scr参数\n    ext:\"\",  // 资源后缀，如果url中没有的话，必须传入后缀名，否则无法识别文件类型\n    name:\"\",  // 资源名称\n    watermarkTxt:\"文件预览系统\", // 水印文字\n    watermarkSize:\"\", // 水印文字大小\n    priority:1, // 优先级 1：使用插件预览 2：使用office在线预览，\n    oburl:\"\", // 可自动设置在线设置office线上预览地址，不需要的话可以不传\n});\n```\n3.  将静态资源放入到你需要的地方，并在初始化的时候，把相对路径填入`staticPath`中。\n4.  pdf预览插件是采用的mjs，需要在服务端中运行，并且在服务端设置MIME类型，以下是nginx的配置方法，不明白的可以百度。\n\n```javascript\nhttp {\n\t...\n\ttypes {\n\t\tapplication/javascript mjs;\n\t}\n\t...\n}\n```\n#### 开源库\n\n1.  `docx-preview` docx文档\n2.  `pptxjs` pptx演示文稿\n3.  `luckysheet` excel表格\n4.  `sheetjs` excel表格，支持xls\n5.  `superVideo` 视频播放器\n6.  `yAudio` 音频播放器\n7.  `watermark` 水印\n8.  `viewer.js` 图片预览\n9.  `pdf.js` pdf预览\n\n#### 已知bug\n\npdf文档暂时不支持中文路径，并且PDF文件预览会造成XSS攻击，获取用户信息。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfd-parser%2Fnfd-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfd-parser%2Fnfd-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfd-parser%2Fnfd-preview/lists"}