✏️ 正在编辑: log_file.js
路径:
/home/ubuntu/plugins-bkp-26012025/integracao-rd-station/assets/js/log_file.js
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
function RDSMLogFile() { var rdsm_log_screen = document.getElementById("rdsm_log_screen"); this.loadLogFile = function() { var rd_form_nonce = document.getElementById("rd_form_nonce").value; jQuery.ajax({ url: ajaxurl, method: 'POST', data: { action: 'rdsm-log-file', rd_form_nonce }, success: function(data) { data.forEach(renderLogScreen); } }); } this.clearLogFile = function() { var rd_form_nonce = document.getElementById("rd_form_nonce").value; jQuery.ajax({ url: ajaxurl, method: 'POST', data: { action: 'rdsm-clear-log-file', rd_form_nonce }, success: function(data) { if (data == 0) rdsm_log_screen.value = ""; } }); } function renderLogScreen(log) { rdsm_log_screen.value += log; } } function copyLogToClipboard() { var copyLog = document.getElementById("rdsm_log_screen"); var value = copyLog.value; copyLog.value = btoa(value); copyLog.select(); copyLog.setSelectionRange(0, 99999); document.execCommand("copy"); copyLog.value = value; } function clearLog() { logFile = new RDSMLogFile(); logFile.clearLogFile(); } function load() { logFile = new RDSMLogFile(); logFile.loadLogFile(); } window.addEventListener('DOMContentLoaded', load);
💾 保存文件
← 返回文件管理器