Get Online Users By ACL

Get list of users from Community page by ACL

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.org/scripts/19628/659177/Get%20Online%20Users%20By%20ACL.js

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

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

function gouba(aclRank) {
  let 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';
  
  let returnedData;
  let matches;
  let onlineUsers = [];
  
  let s = '<a href="\/user\/[a-z)-9_.-]+\/" class="tag1 aclColor_'+aclIds[aclRank]+'">([a-z)-9_.-]+)<\/a>';
  let 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;
    }