Forums

RS-Linkify Thread is sticky

Quick find code: 261-262-33-65181208

J3
Jun Member 2017

J3

Posts: 3,560 Adamant Posts by user Forum Profile RuneMetrics Profile
Oddly enough posts with custom avatars counter my css that seperates the membership button from the avatar... Lets see what this is all about!

edit: ah, linkify's stylesheet > mine.
@J3sven

26-Mar-2015 10:57:42 - Last edited on 26-Mar-2015 10:59:03 by J3

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
I think I can tell you.

When I modify an elements I append a class to it. Usually a prexfix linkify to a class, like linkify-someOriginalClass.

But sometimes I take it step further and remove the original class. I do this with avatars.

Reason is...

Page loads --> Linkify Jumps in.
Linkify injects some scripts before dom is ready. (this is to reduce flickering)
When dom is ready linkify changes elements (avatars and such) and appends back to the document.

But some of the page's content arrives slowly via ajax and writes the original elements over mine.

So to prevent that I rename the elements classnames with linkify- prefix.

Anyway I'm aware other people also like to make changes to the dom. So it's easy for others to accommodate or work with my changes.

Elements I create that never existed have the class prefix rsLinkify- Elements I modify have linkify- prefix. So at a glance you can tell what I've changed and what I've added. You can build on it, remove it whatever. Generally just by removing the prefix will restore the original class and it's styles :)

26-Mar-2015 11:09:13 - Last edited on 26-Mar-2015 11:13:09 by Indecent Act

J3
Jun Member 2017

J3

Posts: 3,560 Adamant Posts by user Forum Profile RuneMetrics Profile
I should read up more on chrome plugins, I have a feeling I could come up with some very cool stuff for personal use. And it didn't take long for me to find out ".linkify-post-avatar__figure" was the offender of my css ruling haha.
@J3sven

26-Mar-2015 11:23:40

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
Chrome is awesome for extensions. It's all HTML, JavaScript and CSS. No propriety language. They have some nice APIs too. If you can make a web page, you can make an extension.

I made an extension in about 15 min that checks and verifies jmod names on twitter and if they are legit name it puts RS logo next to their name.

I never use it, but I just did it because of all fake jmods on twitter and thought it would be pretty easy to detect them. I might tidy it up one day and put it on chrome's apps store.

But that's an example of how straight forward it is. It's good fun :) [

J3 said :
And it didn't take long for me to find out ".linkify-post-avatar__figure


If you remove the linkify prefix the src will remain unchanged but the original styles will apply. A single selector can revert them all back. Sure the !important works too, but sometimes there's cases where that's not desirable.

Anyway get an extension happening. I want to see what you come up with :)

26-Mar-2015 11:28:47 - Last edited on 26-Mar-2015 11:38:30 by Indecent Act

Morgan

Morgan

Posts: 36,054 Sapphire Posts by user Forum Profile RuneMetrics Profile
Woo! Awesome, custom avas and mini avas and all sorts of avas are back. Woo!

I miss being able to see my braids though. I wish that membership logo went away.

26-Mar-2015 12:34:21 - Last edited on 26-Mar-2015 12:34:55 by Morgan

J3
Jun Member 2017

J3

Posts: 3,560 Adamant Posts by user Forum Profile RuneMetrics Profile
Morgan said :
Woo! Awesome, custom avas and mini avas and all sorts of avas are back. Woo!

I miss being able to see my braids though. I wish that membership logo went away.


http://puu.sh/gQhjJ/c5fd868c4d.jpg

Like so?
@J3sven

26-Mar-2015 12:45:05

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