Forums

RS-Linkify Thread is sticky

Quick find code: 261-262-33-65181208

Ryan M
May Member 2008

Ryan M

Posts: 3,095 Adamant Posts by user Forum Profile RuneMetrics Profile
Indecent Act said :
Hmmm I don't that's solved it tbh. I'll keep looking :/

I'd love to help solve this, but each time I attempted to change (tamper) with \extensions\ it tells me the extension is corrupt (YAY) and makes me re-install the extension. I'm sorry if this has caused undo headache.

Seeing as the selectedLanguage preference wasn't the key to fixing this, I'm wondering if it's possible to reproduce this bug. I'm not entirely sure why it has happened on my end right now. Argh, the troubles that befoul us!

Test edit (/c=0/):
HLF OT:
http://services.runescape.com/m=forum/c=0/forums.ws?261,262

General:
http://services.runescape.com/m=forum/c=0/forums.ws?14,15

General/RGU no session:
http://services.runescape.com/m=forum/forums.ws?14,15
http://services.runescape.com/m=forum/forums.ws?15,16

30-Jan-2015 06:16:59 - Last edited on 30-Jan-2015 06:34:25 by Ryan M

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
I have got it, I have 2 methods for getting session ID. One from breaking up the URL and one from reading the DOM.

I was using both, and both actually work. But the result from the DOM appears to coming back to slow. The regex is grabbing multiple strings in the time the I have got result from DOM.

To help  confirm this was the problem, I notice it is most likely to occur where there are multiple links. That of course made think a value was getting carried over, or as you suggested, needs a reset somewhere.

Anyway it seems pulling the URL from addressbar stopped all the issues.

I just hope I'm not speaking too soon :)

Edit: All the above test links are working for me, the real test is throw a few of these into the mix...

­­TEST­­

RL Idea:1
http://services.runescape.com/m=forum/c=221H2R5B*Ms/forums.ws?261,262

General:
http://services.runescape.com/m=forum/c=221H2R5B*Ms/forums.ws?14,15

General/RGU no session:
http://services.runescape.com/m=forum/forums.ws?14,15
http://services.runescape.com/m=forum/forums.ws?15,16

RL Idea:30

RL Idea:35

http://services.runescape.com/m=forum/c=XXXXXXXXXXXX/forums.ws



RL Idea:77

General/RGU no session:
http://services.runescape.com/m=forum/forums.ws?14,15
http://services.runescape.com/m=forum/forums.ws?15,16

Looks good from here, update should be out very soon.

As always, thanks for your help. I likely be oblivious to the fact there was a problem, and I found that unrealated missing '/', that would have come back to bite me.

30-Jan-2015 06:32:55 - Last edited on 30-Jan-2015 07:18:31 by Indecent Act

Ryan M
May Member 2008

Ryan M

Posts: 3,095 Adamant Posts by user Forum Profile RuneMetrics Profile
My method is slightly different versus what idses uses to get the session token. I might have shared this in the past, but I don't remember if I had. Anyhow hopefully the issue is fixed and shall not rise from the dead!

function getCN() { var cM = window.location.href.match(/c=[^\/]*\//i); if (cM) { return cM[0];  }  }


Example (because I'm cheap and only works if you're using the real secure token):
'var d = <a class="main-nav__heading" target="_blank" href="https://secure.runescape.com/m=mtxn_rs_shop/' + getCN() + 'index">Shop<span class="main-nav__expander"></span></a>';

$('li.main-nav__item.main-nav__item--group.main-nav__item--shop a:first').replaceWith(d);


Also I would like to say the only reason I have sl=0 in my links is because for some reason my ISP makes Jagex think I need the French site (it used to be defaulted to Spanish!). Time to go back into my corner.

30-Jan-2015 06:47:36

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Oh sweet, ty. I do prefer a nice regex method.

This is what I ended up using but I'd rather use yours :)

function sIdFromURL(dUrl){
var chrInx = dUrl.indexOf('/c='), retVal = '';
if(chrInx > 22){ // the value 22 is merely a safety check.
dUrl=dUrl.substring(chrInx+3);
chrInx =  dUrl.indexOf('/');
retVal = dUrl.substring(0,chrInx);
}
return retVal;
}

Oh and Version 3.1.7.36 isn't live yet (maybe in 30 min or so), but that's got the fixes....

I hope!

30-Jan-2015 06:58:58 - Last edited on 30-Jan-2015 07:02:24 by Indecent Act

Ryan M
May Member 2008

Ryan M

Posts: 3,095 Adamant Posts by user Forum Profile RuneMetrics Profile
Indecent Act said :
Oh and Version 3.1.7.36 isn't live yet (maybe in 30 min or so), but that's got the fixes....

I hope!

Awesome. You can use it if you want to. It took awhile to get something that worked as I think I built my initial script around Mr Pacman's RFI extension (I might be wrong, it has been so long ago) on changing the site and it evolved from there. Boring story aside and remembering someone who used to play, if you want to, more power to you. :)

It still has nothing on Linkify. Which reminds me, whatever happened to FIS from 2013?

30-Jan-2015 07:18:17 - Last edited on 30-Jan-2015 07:27:10 by Ryan M

Hevilmystic
Feb Member 2022

Hevilmystic

Posts: 60,012 Emerald Posts by user Forum Profile RuneMetrics Profile
I have a "problem":

If I get logged out when I press "submit", I cannot log in via the page it redirects me to. If I try to log in, it puts me back to the login page, again, and again, and again.

Is there anything you (or Linkify) could do to stop it?

I'm not even sure if this is a personal problem, or it happens to everyone.

At times it sounds like it wants to kill you
Unslain Bosses - Clan

30-Jan-2015 07:26:23

Ryan M
May Member 2008

Ryan M

Posts: 3,095 Adamant Posts by user Forum Profile RuneMetrics Profile
Hevilmystic said :
I have a "problem":

If I get logged out when I press "submit", I cannot log in via the page it redirects me to. If I try to log in, it puts me back to the login page, again, and again, and again.

Is there anything you (or Linkify) could do to stop it?

I'm not even sure if this is a personal problem, or it happens to everyone.

At times it sounds like it wants to kill you

What's after /m=weblogin/loginform.ws? ?
Edit 1: Okay.
Edit 2: .35 is live and fixed the issue of session placement. :)

30-Jan-2015 07:30:21 - Last edited on 30-Jan-2015 07:35:17 by Ryan M

Hevilmystic
Feb Member 2022

Hevilmystic

Posts: 60,012 Emerald Posts by user Forum Profile RuneMetrics Profile
Ryan M said :
What's after /m=weblogin/loginform.ws? ?


According to my history, this (followed by &key=blablabla at the end of my post data):

http://i.imgur.com/MWpYBuy.png

But iirc, there's nothing.

Indecent Act said :
^Yep I've had that many times. I just go to home page and log in from there, works 100% of the time for me.


Yup, thankful for the "restore last post" option, still rather annoying having to go to the home page though, even when there isn't a shortcut there from the log in page.

At times it sounds like it wants to kill you
Unslain Bosses - Clan

30-Jan-2015 07:34:52

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