druid连接池控制台显示sql全文

原来的sql是缩略的,不便于搜索,通过该插件可以显示sql全文

// ==UserScript==
// @name         druid连接池控制台显示sql全文
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  原来的sql是缩略的,不便于搜索,通过该插件可以显示sql全文
// @author       Jeffrey Huang
// @match        *://*/druid/sql.html*
// @match        *://*/*/druid/sql.html*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org
// @grant        none
// @require      https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js
// @license MIT
// ==/UserScript==



function showSQL() {
    $("#dataTable tbody tr").each(function () {
        var tdArr = $(this).children();
        tdArr.eq(1).find("a").text(tdArr.eq(1).find("a").attr("title"))
    });
}

(function () {
    'use strict';
    console.log("druid连接池控制台显示sql全文")
    setTimeout(function () {
        druid.sql.switchSuspendRefresh();
        showSQL();

        $("a").click(function () {
            setTimeout(function () {showSQL();}, 2000);
        });
    }, 2000);
})();