I'm a lifer!


#1

I’m so excited about this, I just had to share :grin:


#2

Good choice! Welcome to the club. Now we both just need to join the super special level 60 club and get the shiny gold medals :slight_smile:


#3

Thanks! Yes, my plan is to get to level 60, savour it a bit, and then reset to one.


#4

It’s quite the club, I’ll tell you!

Every once in a while, someone even does or says something, it’s crazy!


#5

Wow! I want to do that too!


#6

I also upgraded to lifetime! Exciting!


#7

Aaaaaaaaand I’m a lifetime member. Any tips on how to celebrate?


#8

Just adding a bit of blue to this purple fest.


#9

Print your bank statement!


#10

Still beautiful, thank you!


#11

image

And now you’ve added more rainbow.


#12

Oh my… there needs to be a userscript for this!


#13

248874616142036992 https://greasyfork.org/en/scripts/36404-wanikani-forums-rainbow-flairs


#14

Just think, you’re over halfway to this pinnacle of excitement!


#15

FYI, you can eliminate the mutation observer and use only CSS:

code (click to open)
function rainbowify(user_id) {
	$('head').append(
		'<style user-id="'+user_id+'">'+
		'	[data-user-id="'+user_id+'"] .avatar-flair {'+
		'		color: rgb(42,42,42) !important;'+
		'		background: linear-gradient(-45deg, #f9c4fb , #dab3fc, #bdd6ff, #c3fdd2, #fcfec2, #f8d4a6, #f8b9b9) !important;'+
		'	}'+
		'</style>'
	);
}

function unrainbowify(user_id) {
	$('style[user-id="'+user_id+'"]').remove();
}

#16

Oh really? I’m new to JS so I’m a bit embarrassed to have people look at my code, I’m happy as long as it works. I understand that it adds the css, but how does that work when the flair isn’t a descendant of anything relating to the username?

edit: nvm, I see now. That’s clever, I wouldn’t have thought of it.


#17

Just some tricks I learned along the way.
Always glad to help :slight_smile:


#18

I have no idea what any of anything means and you made something that creates beautiful rainbows. I think you have zero reasons to be embarrassed! I love it and thanks for making it!


#19

Hmm, I wonder though. I’m also using the mutation observer to attach a function to avatars when you load new posts. Your trick definitely makes the script simpler, but I don’t think I could remove the mutation observer


#20

I just did the thing and went lifer