Forums

RS-Linkify Thread is sticky

Quick find code: 261-262-33-65181208

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
@J3, Paste this directly in chrome's console and hit enter. It's an answer to a question you asked the other day.

function sIdFromURL(dUrl) {
"use strict";
if (dUrl === 0) {dUrl = document.URL; }
dUrl = dUrl.match(/^https?:\/\/(services|secure)\.runescape\.com[\w\W]+\/(c=[A-Z0-9-*]+?[?=\/])/i);
return dUrl ? dUrl[2] : null;
}

function getFriends(sIdFromBG) {
"use strict";
var fList = [],
totalPages = 1,
fPno = 1;
function flReq() {
$.ajax({
url: 'ht tp://services.runescape.com/' + sIdFromBG + 'm=website-data/playerFriendsDetails.json?resultsPerPage=24&currentPage=' + fPno + '&callback=?',
async: true,
dataType: 'jsonp',
timeout: 3000,
success: function (response) {
totalPages = response.totalPages;
console.log(Math.floor(fPno / totalPages * 100) + '%');
/*jslint unparam: true*/
$.each(response.friends, function (i, item) {
fList.push(item.name);
});
/*jslint unparam: false*/
fPno = fPno + 1;
if (fPno <= totalPages) {
setTimeout(function () {
flReq();
}, 1000);
} else {
console.log(fList);
}
},
error: function () {
//grrr
}
});
}
flReq();
}
getFriends(sIdFromURL(0));

23-Mar-2015 11:17:10 - Last edited on 23-Mar-2015 11:50:30 by Indecent Act

Amaethwr
Aug Member 2008

Amaethwr

Posts: 14,634 Opal Posts by user Forum Profile RuneMetrics Profile
Hey Indy, sorry to disappoint, but.. maybe its a different case with prefixes:

http://puu.sh/gMbII.png

http://puu.sh/gMbLK.png

I only see it next to the reply box, btw

E: After post sent, there was only 1 title for me, and then refreshing the page made 2 appear again..

E2: Updating mesage gave same result as making the original post, refreshing makes 2 appear again (checked for coincidence or not)
Selective Completionist

23-Mar-2015 12:36:53 - Last edited on 23-Mar-2015 12:39:16 by Amaethwr

J3
Jun Member 2017

J3

Posts: 3,560 Adamant Posts by user Forum Profile RuneMetrics Profile
it appears I have broken the signature character limit

edit: it also won't let me revert it, gamebreaker title pls jagex.

edit2: nvm, but it seems that jagex hates dongers &#12541;&#3900;&#3720;&#1604;&#860;&#3720;&#3901;&#65417;
@J3sven

23-Mar-2015 13:32:50 - Last edited on 23-Mar-2015 13:42:06 by J3

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
I got the titles sorted, it's not an elegant fix but it'll do for now. Version 3.1.7.56

The trouble is the titles come in after page load, and the time it takes for them to arrive is random.

So Linkify usually cant see them, because they are not here. Since they are not guaranteed to arrive (not sure if title glitch is fixed now, or not everyone has one), it makes things a bit tricky.

Eventually I'll take control of them, like I did pre-reskin and I'll pull the clan names out with them using much more elegant methods to handle them. But until then they'll be a little unpredictable.

J3 said :
it appears I have broken the signature character limit

edit: it also won't let me revert it, gamebreaker title pls jagex.

edit2: nvm, but it seems that jagex hates dongers &#12541;&#3900;&#3720;&#1604;&#860;&#3720;&#3901;&#65417;

I haven't looked at the signatures yet, but I think Ryan M said it was possible to exceed the character limit.

23-Mar-2015 13:47:38 - Last edited on 23-Mar-2015 13:48:28 by Indecent Act

Quick find code: 261-262-33-65181208 Back to Top