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
Another question as I can't seem to get this last thing working as I want it to. Took me a bit to figure out Chrome does not save alt for nbsp when I was doing console tests.

So this is to do with coloring the Created by text if they are an FMod. I just can't get the array I've made to work as I'd expect it. $.each is something I've considered, but not explored yet.

var test = localStorage.getItem('fmodsList'); //Updates when accessing forummods.ws
$('.thread-plate__summary:contains("' + $.inArray(test) + '")').each(function (index, ele) {
console.log(index);
});


What am I missing? doing test[2] makes some things change but it's never right. There are 68 names in it but I can't seem to compare or cycle through the list. :(

It's like it's easier to proofread someone elses code and not your own. Or rather my dealing with arrays has been minimal. Being consistent in writing is not my forte. http://pastebin.com/PVSQ4Dyu

21-Mar-2015 06:16:18

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Fairytales said :
Haha yeah, had this glitched avatar for the longest time! No idea what initially caused that :P I look forward to seeing how my linkify avatar looks!

Did you put that next update out yet now that you're up? :)


Don't know if I'll get the custom avatars out today, but I will have an update later for some other custom options. I will get to them soonish :)

Ryan M said :
Another question as I can't seem to get this last thing working as I want it to. Took me a bit to figure out Chrome does not save alt for nbsp when I was doing console tests.

So this is to do with coloring the Created by text if they are an FMod. I just can't get the array I've made to work as I'd expect it. $.each is something I've considered, but not explored yet.

var test = localStorage.getItem('fmodsList'); //Updates when accessing forummods.ws
$('.thread-plate__summary:contains("' + $.inArray(test) + '")').each(function (index, ele) {
console.log(index);
});


What am I missing? doing test[2] makes some things change but it's never right. There are 68 names in it but I can't seem to compare or cycle through the list. :(

It's like it's easier to proofread someone elses code and not your own. Or rather my dealing with arrays has been minimal. Being consistent in writing is not my forte. http://pastebin.com/PVSQ4Dyu


I'm actually working on something similar right now. But I haven't started on the fmod yet.

I haven't looked at your code yet, will be a few min before I take a look. I'll post again when I can offer some input :)

21-Mar-2015 06:24:23

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
jquery doesn't handle text nodes as objects, so some good old fashioned vanilla js is needed. jquery can dump the text, but as far I know not as an object. Don't quote me on that, I may be wrong but from my understanding js nodeType is the way to go :)

Okay try this in console on forum subsection.

$('.thread-plate__last-post').contents().each(function (i, e) {
if (this.nodeType === 3) {
console.log($(e).text().slice(3));
//if (fmods.indexOf( $(e).text().slice(3) ) !== -1) {
//do stuff
//}

}
});

Edit: I'm currently working on custom colours for backgrounds (friend/clan/others) and post borders. Next bit for me is to last post and author text. But since I haven't started on the text bit, this may gives me a head start. What I end up doing could be different though, we'll see :)

Gradients are nice...
HTTP://i.imgur.com/yOK9Urr.png

21-Mar-2015 06:48:31 - Last edited on 21-Mar-2015 07:05:50 by Indecent Act

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Ryan M said :
(Not Linkify) Thanks a ton:
http://i.imgur.com/bZ0GJ89.png

Also that blue gradient. :D


Looks good Ryan M, very nice indeed :)

Wasn't sure if what I posted was even relevant or helpful, but looks you got it well and truly sorted :)

21-Mar-2015 09:05:33 - Last edited on 21-Mar-2015 09:06:11 by Indecent Act

Ryan M
May Member 2008

Ryan M

Posts: 3,095 Adamant Posts by user Forum Profile RuneMetrics Profile
Had to make a couple changes as for some reason it would do changes on My Profile with .thread-plate__summary (&& window.location.href.match(/forums.ws/) is my saving grace.

By the way, what was the command in users.ws to activate/deactice emoticons? #forgot

21-Mar-2015 09:46:08

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Ryan M said :
Had to make a couple changes as for some reason it would do changes on My Profile with .thread-plate__summary (&& window.location.href.match(/forums.ws/) is my saving grace.

By the way, what was the command in users.ws to activate/deactice emoticons? #forgot


This should do it. I don't know how to query it though. So I always displayed both options.

users.ws?my_profile=true&showsmileys=show&togglesmileys=Switch+on+smileys


users.ws?my_profile=true&showsmileys=dontshow&togglesmileys=Switch+off+smileys

21-Mar-2015 09:56:43 - Last edited on 21-Mar-2015 09:59:00 by Indecent Act

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