Curious about RDF originalCode tags

edited December 2007 in Stylish
This one's directed towards Jason...

I'm just curious, but while looking at the stylish.rdf file, I noticed quite a bit of what seemed like duplicate code between <stylish:originalCode> tags. What's the reason for storing the original code? I've never seen anything that allows you to revert back to the original code of a style you've modified, so why keep it?

I meant to ask this question a long time ago when I wrote a quick Perl script to convert the stylish.rdf file to multiple .css files, but I suppose it's never too late to ask =) BTW, my stylish.rdf is currently at a hefty 1.2 megs in size...140 styles total.

Comments

  • Interesting. I never noticed that before. I have 12 of them out of about 150 styles.
  • I removed all of the "original code" snippets without any ill effects.

    I also noticed I have a lot of neverUpdate="true" and neverUpdate="false" entries, but there is no logic to them (e.g., some of my unpublished styles are neverUpdate="false", which I assume means update=true). I'd like to set all of my styles to neverUpdate. Is it OK to search and replace so every entry is neverUpdate="false"?
  • originalCode is used when doing updates. If originalCode != current code, then the style shows as customized, which tells you that you'll lose your customizations should you update it.

    neverUpdate only has an effect for styles you installed from userstyles.org. If neverUpdate = true, you'll never be prompted to update the style. Since you can't update styles you created yourself, it has no effect on them.
  • Perhaps you could include the style update timestamp in , and another in .

    Could also store hash values for current & original code.
Sign In or Register to comment.