Get Online Users By ACL

Get list of users from Community page by ACL

目前為 2018-02-05 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/19628/248924/Get%20Online%20Users%20By%20ACL.js

/*
 *  name         Get Online Users By ACL
 *  namespace    pxgamer
 *  version      0.5
 *  description  Get list of users from Community page by ACL
 *  author       pxgamer
 */

function gouba(aclRank) {

        var aclIds = [];
        aclIds.user = '1'; aclIds.vul = 'verified'; aclIds.eul = 'eliteuploader'; aclIds.super = '2'; aclIds.elite = '3';
        aclIds.translator = '4'; aclIds.fmod = '5'; aclIds.thelper = '6'; aclIds.tmod = '7';   aclIds.smod = '8';
        aclIds.staff = '9'; aclIds.admin = '10';

        var returnedData;
        var matches;
        var onlineUsers = [];

        var s = '<a href="\/user\/[a-z)-9_.-]+\/" class="tag1 aclColor_'+aclIds[aclRank]+'">([a-z)-9_.-]+)<\/a>';
        var searchString = new RegExp(s,'gi');


        console.log(searchString);

        $.ajax({
            type: "GET",
            url: "/community/",
            async: false,
            success: function (data) {
                returnedData = data;
                while (matches = searchString.exec(returnedData.html)) {
                    onlineUsers.push(matches[1]);
                }
            },
            returnData: "json"
        });
        return onlineUsers;
    }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址