This page lists files in the current directory. You can view content, get download/execute commands for Wget, Curl, or PowerShell, or filter the list using wildcards (e.g., `*.sh`).
wget 'https://sme10.lists2.roe3.org/kodbox/plugins/pdfjs/app.php'
<?php
class pdfjsPlugin extends PluginBase{
function __construct(){
parent::__construct();
}
public function regist(){
$this->hookRegist(array(
'user.commonJs.insert' => 'pdfjsPlugin.echoJs',
));
}
public function echoJs(){
$this->echoFile('static/app/main.js');
}
/**
* pdf: pdfjs,http://mozilla.github.io/pdf.js/getting_started/
* ofd: https://gitee.com/Trisia/ofdrw; 支持移动端,手势缩放; 文本选择复制等暂支持不完善;
* ofd其他:https://www.yozodcs.com/page/example.html
*
*
* pdf.js修改 // 适配分片加载预览: if (contentEncoding !== "identity" && contentEncoding != 'none') {
*/
public function index(){
$path = $this->in['path'];
$fileUrl = $this->filePathLink($path).'&disable_name=1';
$fileName = $this->in['name'].' - '.LNG('common.copyright.name').' - '.LNG('common.copyright.powerBy');
$canDownload = Action('explorer.auth')->fileCan($path,'download');
$fileType = $this->in['ext'];
if($fileType == 'ai'){$fileType = 'pdf';}
if( in_array($fileType,array('pdf','djvu','ofd')) ){
include($this->pluginPath.'/php/'.$fileType.'.php');
}
}
}
wget 'https://sme10.lists2.roe3.org/kodbox/plugins/pdfjs/package.json'
{
"id":"pdfjs",
"name":"{{LNG['pdfjs.meta.name']}}",
"title":"{{LNG['pdfjs.meta.title']}}",
"version":"1.55",
"source":{
"icon":"{{pluginHost}}static/app/images/icon.png",
"screenshoot":[
"{{pluginHost}}static/app/images/screenshoot1.png"
]
},
"category":"file",
"description":"pdfjs viewer",
"keywords":"",
"auther":{
"copyright":"kodcloud.",
"homePage":"http://www.kodcloud.com",
},
"configItem":{
"pluginAuth":{
"type":"userSelect",
"value":{"all":1},
"display":"{{LNG['admin.plugin.auth']}}",
"desc":"{{LNG['admin.plugin.authDesc']}}",
"require":1
},
"sep1001":"<hr/>",
"fileExt":{
"type":"tags",
"display":"{{LNG['admin.plugin.fileExt']}}",
"desc":"{{LNG['admin.plugin.fileExtDesc']}}",
"value":"pdf,djvu,ofd,ai",
},
"fileSort":{
"type":"number",
"display":"{{LNG['admin.plugin.fileSort']}}",
"desc":"{{LNG['admin.plugin.fileSortDesc']}}",
"value":1000,
}
}
}