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
Hevilmystic said :
Oo I see, it makes sense now that you explain it.

I am assuming there's no way for Linkify to tell the difference between a 1-frame gif, and an animation gif?


It is possible, but it requires some changes to linkify that I'm not keen on doing. To analyse a sample of the file some useful info can be obtained. But this would require either relaxing the strict restrictions (content policy) I have imposed on linkify, and it would require use of google api's that mean RS Linkify would have to run persistently (more resource hungry).

While these are not necessarily major issues, I'd rather not change them unless the benefits are huge. The other thing is, the info obtained from doing this can't be 100% guaranteed as correct or safe. In most cases it would be fine. But I'm sure you'd agree most cases is not good enough when there is trade off. It's these restrictions that make me confident enough to say I stand by Linkify as being safe.

On top of all that, it only address a part of the problem. I still need to cover other hosts and not just gifs, a 25MB png isn't something I want to encounter either.

I must take into account the occurrences of this happening, and that offending users can be blacklisted as can the links.

So I think a simple option: Abort image loading after X seconds (X being you're own preference) is the way to go.

Worst case is your browser is laggy for those few seconds. Every unfinished task will be aborted, the images/gifs that didn't load will be clickable links that open in a new tab should you wish to view them.

Need to put into practice and test it, then I'll know for sure.

There is other stuff I haven't mentioned or explained, like images can't be aborted. Even deleting a partial image doesn't abort the request, it continues until complete. However the browser can be stopped, and then everything stops, and that's the way I have to go.

28-Feb-2015 14:56:36

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Ryan M said :
So I got bored and did some edits to AjaxRC for RS. It's not bad and I'm going to at least use it with my TM/GM scripts. :) http://pastebin.com/AuV4ztgz If you want it.


Oh sweet, that looks really nice. Just about to run it in the console now.

I really like seeing other people's code, especially when it's something I can relate to or even better, something I can apply.

Thank you very much for sharing :)

28-Feb-2015 15:00:05

Lithuanian
Apr Member 2014

Lithuanian

Posts: 2,913 Adamant Posts by user Forum Profile RuneMetrics Profile
Code for this avatar, please :P

http://puu.sh/ggtHy/5363368cdb.png
Success
consists of going from
failure
to
failure
without loss of
enthusiasm
.

5.6b xp [x] Moa [x] Mqc [x] Trim [x] Boss/Slay Logs [x] Max Runescore [x]

28-Feb-2015 16:33:08

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Here you go :)

­­­­Lithuanian­­ http://www.indecentcode.com/rslinkify_images/10675.png ­­10675­­­­

Edit: Just in case you want just the eyes

­­­­Lithuanian­­ http://www.indecentcode.com/rslinkify_images/10676.png ­­10676­­­­

28-Feb-2015 17:07:19 - Last edited on 28-Feb-2015 17:14:48 by Indecent Act

Lithuanian
Apr Member 2014

Lithuanian

Posts: 2,913 Adamant Posts by user Forum Profile RuneMetrics Profile
Awesome, thanks!

Could you generate on more code, please?

http://puu.sh/ggyUm/163234052b.png
Success
consists of going from
failure
to
failure
without loss of
enthusiasm
.

5.6b xp [x] Moa [x] Mqc [x] Trim [x] Boss/Slay Logs [x] Max Runescore [x]

28-Feb-2015 17:29:18 - Last edited on 28-Feb-2015 17:49:22 by Lithuanian

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