plugin/skyeditor/skyeditor.js
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
var skyeditor = {};
skyeditor.isfirst=true;
skyeditor.root = document.domain? location.protocol+"//" + document.domain + "/plugin/skyeditor/":"";
skyeditor.uploadUrl = "/index.php?m=upload&a=base64";
skyeditor.uploadVideo = "/index.php?m=upload&a=UploadMp4";
skyeditor.colors=['#1ebdc0','#f8375b','#fd8f43','#a4ce3b','#35dab6','#199de1','#9581f3','#333','#8f8f94'];
skyeditor.html='<div class="sky-editor-loading">上传中...</div><div class="sky-editor"> <div class="sky-editor-colors"> </div> <div class="sky-editor-emojis"> </div> <div class="sky-editor-tools"> </div> <input type="file" id="sky-editor-file" name="upimg" multiple="multiple" style="display: none;" /> <input type="file" id="sky-editor-file-video" name="upimg" style="display: none;" /></div>';
skyeditor.skyUpload = function (upid, url, success, error, uploadProgress) {
var vFD = new FormData();
var f = document.getElementById(upid).files;
$("#" + upid + "loading").show();
for (var i = 0; i < f.length; i++) {
vFD.append('upimg', document.getElementById(upid).files[i]);
// create XMLHttpRequest object, adding few event listeners, and POSTing our data
var oXHR = new XMLHttpRequest();
oXHR.addEventListener('load', success, false);
oXHR.addEventListener('error', error, false);
if (uploadProgress != undefined) {
oXHR.upload.addEventListener("progress", uploadProgress, false);
}
oXHR.open('POST', url);
oXHR.send(vFD);
}
}
skyeditor.init = function () {
if(skyeditor.isfirst){
$("<link>")
.attr({
rel: "stylesheet",
type: "text/css",
href: skyeditor.root + "skyeditor.css"
}).appendTo("head");
$(".sky-editor-content").after(skyeditor.html);
$(".sky-editor-content").after('<textarea id="sky-editor-textarea" style="display:none;" name="'+$(".sky-editor-content").attr("name")+'"></textarea>');
//同步定时器
setInterval(function(){
$("#sky-editor-textarea").val($(".sky-editor-content").html());
},600);
skyeditor.isfirst=false;
}
skyeditor.skyEmojis();
skyeditor.setColors();
skyeditor.setTools();
}
skyeditor.setColors=function(){
var html='';
for(var i in skyeditor.colors){
html=html+'<div class="sky-editor-excute" style="background-color:'+skyeditor.colors[i]+';" data-role="ForeColor"></div>';
}
$(".sky-editor-colors").html(html);
}
skyeditor.tools=["h3","pic","color","B","video","emoji","center"];
skyeditor.setTools=function(){
后面还有 187 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。