Wikia Developers Wiki

HighlightUsers using auto-generated CSS

  • HighlightUsers has been unmaintained for over 2 years. Several issues user have suggested have not been fixed.

    Here I suggest a few changes:

    • Use auto-generated CSS instead of adding color to elements one by one. - Using Ajax to color elements is slow and elements loaded after the script are not colored. CSS stylesheet ensures all matched elements are colored whenever they are loaded.
      • Neither $(document).ready(); nor $(window).load(): is able to solve this problem.
    • Use caches to save loading time. (You don't want to generate the same stylesheet every time you load a page, right?)
    • Detect user rights changes so that the stylesheets are updated once there are any changes.
    • Suggested by mfaizsyahmi and leviathan_89: Give each user group a specific class.
    • Exclude links in "My favorite wikis".
      Loading editor
    • Agreed with using a stylesheet, and caching said stylesheet. Perhaps caching can be done with localStorage, and fall back to cookies. That said, I tend to use one or the other but not both, supporting both bloats the code and makes it harder to maintain IMO.

      I'm not sure how to properly do "detect user rights changes" without making AJAX calls on every page load.

      Adding user group classes is the natural step forward IMO.

        Loading editor
    • A Fandom user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.