Forums

RS-Linkify Thread is sticky

Quick find code: 261-262-33-65181208

Gladz

Gladz

Posts: 1,012 Mithril Posts by user Forum Profile RuneMetrics Profile
Avid Firefox user here, is it possible to add it there too? I'm using Chrome now solely for the forums.

Either way, the entire thing is nicely put together. I downloaded it a while back, but it has come a long ways since.

18-Nov-2014 23:13:19

Ryan M
May Member 2008

Ryan M

Posts: 3,095 Adamant Posts by user Forum Profile RuneMetrics Profile
Welcome back Indecent. :) #late #lurking
Indecent Act said :
@Rowley, wow nice find. I've never seen a Ryan M in the wild, well spotted :)

This could be why you might not see me:
https://i.imgur.com/hoKvy1k.png

Logout timer:
Indecent Act said :
@Lifer, I'm not sure how the forum session expiry works, but it's the server logging you out and I have no way of interacting with that. It seems not being idle on forums prolongs your session, but not indefinitely. Even tricking the forums to think you're active wont prevent you getting logged out.

I will look into it but there may be little I can do, and of course there are reasons for having our sessions expire. As for that Link you posted, there is something I can do about that :) .

It's saved to a cookie named __utmb. It updates to an max age of +1 hour after interacting the page you are on. The max age overall I believe is 6 hours like the main game server-side to check for mutes and bans.
­­­­
A few things that might have been overlooked:
QFC dead links:
Ryan M said :
By the way, I think this looks interesting if you were to symbolize dead links :

$('td.messageCell a[href$="#"]').not('.quotedPostLink').contents().filter( function () { return this.nodeType = 3; } ).parent().append('<img src="http://www.indecentcode.com/hween/lock.png">');

Skins:
Cyanid said :
give us option to switch skin of rs forums.

It's possible as seen here . Re-skinning anything on the site from my experience has the negative effect of load times if it's massive, having to constantly update it to work with site updates, and not loading at all (thanks Tampermonkey).

19-Nov-2014 06:11:10

Ryan M
May Member 2008

Ryan M

Posts: 3,095 Adamant Posts by user Forum Profile RuneMetrics Profile
Gladz said :
Avid Firefox user here, is it possible to add it there too? I'm using Chrome now solely for the forums.

Either way, the entire thing is nicely put together. I downloaded it a while back, but it has come a long ways since.

It's possible to add it to Firefox. However it's overall easier to build it for Chrome because of just needing to simply update manifest.json by a version number and fewer files to maintain versus Chrome.

I won't say that it's easy to build either, but porting the extension over to Firefox means that more testing has to be done in the end to ensure everything works properly on both browsers. Maybe with some help it can be done, and I think it's a possibility, but it's likely to be left alone for the time being.

­­­­
Edit:
For the post above, I was looking at the logout timer a bit more. You could retrieve the cookie like so based off an answer from Stackoverflow (modified slightly):

https://i.imgur.com/6xfO35M.png
function readCookie(name) { return (name = new RegExp(('') + '=([^;]*)').exec(document.cookie)) && name[1]; } readCookie("__utmb").replace(/%20/g, " ").replace(/%2C/g, ",").replace(/%3A/g, ":");
For some reason it only changes (if saved as a variable) when you edit or make a new post. Maybe something else will be better there.

Now I don't think it's a good idea to change the expiration, and I might be wrong that you cannot change the expiration on already set cookies, but you can alert someone when it's about to expire.

Another way is to set a timeout function for 55 minutes although I'm unsure if setting a settimeout of 3,300,000 will reduce performance on the page. Just food for thought. On another note, found that noparse works for at least something now. No more emoticons in code. :)

Source:
http://stackoverflow.com/questions/5639346/shortest-function-for-reading-a-cookie-in-javascript

19-Nov-2014 06:29:49 - Last edited on 19-Nov-2014 08:23:12 by Ryan M

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Thanks for the gallery update Rowley :)

@Gladz,

I have had a look at making an extension for fire fox, it's not as straight forward as I hoped but I will get there. Don't expect anything soon though, and when I do get something up and running for Fire Fox it'll most likely be a lite version at first.

Basically it's something I'd like to do, and I have looked into it. I just cant give an ETA, but one day it will happen.

19-Nov-2014 08:59:35

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Hiya Ryan M :)

Wow I don't even know what part of RS that pic is from (though I haven't logged in on this account since before Halloween), I assume it's Elf City?

You just saved me loads of time in regards to the cookie, ty for that. There is one issue with cookies, extensions are treated as though they are a separate domain (makes sense for cross origin rules). However that means I can't modify the cookies. It would be like one web site modifying your cookies for a different site, thus there are measures in place to prevent that (as there should be).

So that leaves me with the option to inject a script into the page that runs within the scope of the page (dirty I know), and not within the extension. That would allow me to modify the cookie. The next thing is I need the page to tell Linkify success/fail, and of course the page can't talk to Linkify. So again more injection to modify the page on success and then Linkify needs to detect that modification and proceed accordingly.

Do-able....yes. Elegant no, in fact it's pretty messy. I don't feel good about a mess that technically will weaken security. I say this because I believe sessions expiring is a good thing, not a bad thing.

In all honesty my knowledge of cookies combined with both domains and extensions is limited. I suspect there is a chrome API just for handling cookies. But that means I need alter the extension permissions for cookie modifying, and tbh I'm not keen on that because the way extensions work, means no one can update unless they accept.

I'm not saying no it's out the question, just putting my concerns out here. An update like this has pros and cons. I need the pros to far outweigh the cons before doing something like this. Maybe I'm way off with this (I can't see this kind of update being in the best interest of Linkify users), and if so hopefully someone can put me back on track :)

19-Nov-2014 09:03:36 - Last edited on 19-Nov-2014 09:07:00 by Indecent Act

Ryan M
May Member 2008

Ryan M

Posts: 3,095 Adamant Posts by user Forum Profile RuneMetrics Profile
Indecent Act said :
Hiya Ryan M

Wow I don't even know what part of RS that pic is from (though I haven't logged in on this account since before Halloween), I assume it's Elf City?

You just saved me loads of time in regards to the cookie, ty for that.

Yes, it's part of the Ithell section of Prifddinas. I just have it where if you position the camera a certain way while using the Orb of Oculus most of Prifddinas will disappear.

You should check your main account once in awhile anyway even if it's just for a few moments. You are welcome as I was also interested in the session information. :)

Edit: Not that it matters much, but it seems that if the first post is hidden on any page in a thread the clan names will not appear below avatars on that page. Maybe it has been seen before and wasn't thought of much. Anyhow, cheers. :)

19-Nov-2014 09:13:39 - Last edited on 19-Nov-2014 10:16:56 by Ryan M

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