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
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.
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