超管单点 - edoc2.com

2021/7/12下午8:37:13

目前為 2021-08-11 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        超管单点 - edoc2.com
// @namespace   lihuozi
// @match       *://*/admin/org/index
// @grant       none
// @version     1.1
// @author      李豁子
// @description 2021/7/12下午8:37:13
// ==/UserScript==
myFuncs = {};

myFuncs.init = function () {
    $(".datagrid-btable tr").each((i, el) => {
        console.log(el);
        var text = $(el).find('td:eq(2) div').html().split('(')[1];
        var account = text.substring(0, text.length - 1);
        $(el).find('td:eq(2)').dblclick(function () {
            myFuncs.toPage(account);
        });
        alert("附魔成功!");
    });
};

myFuncs.toPage = function (account) {
    var settings = {
        "url": "/api/services/Org/UserLoginIntegrationByUserLoginName",
        "method": "POST",
        "timeout": 0,
        "headers": {
            "Content-Type": "application/json"
        },
        "data": JSON.stringify({
            "LoginName": account,
            "IPAddress": "127.0.0.1",
            "IntegrationKey": "46aa92ec-66af-4818-b7c1-8495a9bd7f17"
        }),
    };
    $.ajax(settings).done(function (res) {
        console.log(res);
        var url = location.origin + '/index.html?token=' + res.data;
        window.open(url);
    });
};
(function () {
    'use strict';
    try {
        window.myFuncs = myFuncs;
        setTimeout("window.myFuncs.init()", 3000);
    } catch (err) {
        console.log(err);
    }
})();