« on: June 05, 2014, 11:43:17 pm »
For coders only!
This code utilizes jQuery, please use the latest version found in this thread: http://support.createaforum.com/5/jquery-v1-8-update/function accID(n){var t,i;return $.ajax({url:smf_scripturl+"?action=mlist;sa=search",async:!1,type:"POST",data:"search="+n+"&fields%5B%5D=name"}).done(function(r){if(t=$(r).find("#mlist").children("table").children("tbody").children("tr").eq(0).children("td").eq(1).children("a"),t.html()!==n)return console.log("accID: Username "+n+" not found"),!1;i=t.attr("href")}).fail(function(){return console.log("accID: Failed to send POST request"),!1}),i.split("u=")[1]}
Usage:
accID(username);
« Last Edit: December 13, 2014, 07:52:44 pm by aIURbliS »
Logged
All codes I make are tested on the latest version of Google Chrome and upon request of other browsers.