Get User Hash

Get any user's hash, for various activities

2018-02-05 يوللانغان نەشرى. ئەڭ يېڭى نەشرىنى كۆرۈش.

بۇ قوليازمىنى بىۋاسىتە قاچىلاشقا بولمايدۇ. بۇ باشقا قوليازمىلارنىڭ ئىشلىتىشى ئۈچۈن تەمىنلەنگەن ئامبار بولۇپ، ئىشلىتىش ئۈچۈن مېتا كۆرسەتمىسىگە قىستۇرىدىغان كود: // @require https://update.greasyfork.org/scripts/19550/248923/Get%20User%20Hash.js

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

/*
 *  @name         Get User Hash
 *  @namespace    pxgamer
 *  @version      0.2
 *  @description  Get any user's hash, for various activities
 *  @author       pxgamer
 */

function guh(username) {
        var re = /<a href="\/bookmarks\/[a-z]+\/[a-z]+\/([a-z0-9]+)\/" class="[a-z]+Link kaButton smallButton normalText"><i class="ka ka-bookmark"><\/i>/ig, matches, ret = [];
        $.ajax({
            type: "GET",
            url: "/user/"+encodeURIComponent(username)+"/",
            async: false,
            success: function (data) {
                while (matches = re.exec(data.html)) {
                    ret.push(matches[1]);
                }
            },
            returnData: "json"
        });
        console.log(ret[0]);
        return ret[0];
    }