zoukankan      html  css  js  c++  java
  • 去除CKFinder版权提示信息

    CkFinder版权提示有两个地方,分别在树形列表下方和文件列表框上部,可以通过修改CSS来隐藏内容

    因原始JS文件中的文本都是编码过的,类似

    var x="103x6f156x6e145143x74157162x2fx43x6fx6e156145143164x6fx72111x6e146x6fx2f";
    
    直接查找不方便,所以通过以下代码解码后得到:var x="Connector/ConnectorInfo/";,这样查找就方便多了


    以下为解码代码:

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
    </head>
    <body>
        <div id="msg"></div>
        <input id="Button1" type="button" value="解码" onclick="r();" />
        <br />
        <textarea rows="20" cols="100" id="t"></textarea>
    </body>
    </html>
    <script type="text/javascript">
        function r() {
            var reg = new RegExp("(\\...){5,}", "mg");
    
            var instr = document.getElementById('t').value;
            document.getElementById('msg').innerText = document.getElementById('t').value.replace(reg, function (m, p1, p2, p3) {
                var str = 'var x="' + m + '"';
                eval(str);
                return x;
    			//下面这段手工解码
                //var result = "";
                //for (var i = 0; i < m.length; i += 4) {
                //    var s = m.substr(i, 4).substr(1, 3);
                //    if (s.substr(0, 1) == "x") {  //十六进制
                //        var n = parseInt(s.substr(1,2), 16)
                //    } else {
                //        var n = parseInt(s, 8);   //八进制
                //    }
                //    result += String.fromCharCode(n);
                //}
                //return result;
            });
        }
    </script>
    

    得到明文后通过查找版权信息所在位置,然后将元素设置style.display=none即可。

    
    
    A:
    var r = "<div class='view tool_panel' style='padding:2px;display:block !important;position:static !important;color:black !important;background-color:white !important;'>"
    
    
    
    B:
    <h4 class='message_content'></h4>
    

  • 相关阅读:
    Python入门:局部变量与全局变量2
    Python入门:局部变量与全局变量1
    Python入门:函数参数1
    Python入门:文件操作1
    Python入门:集合操作
    Python入门:用字典实现三级菜单
    Python入门:购物车实例
    Python:循环
    git 提交指定提交时用户名
    mysql 判断null 和 空字符串
  • 原文地址:https://www.cnblogs.com/apollokk/p/6713815.html
Copyright © 2011-2022 走看看