

Hacky version control for html - omouse
http://www.neverfriday.com/html-version-control/web-vc.html

======
omouse
I want to thank God, my mom, _looks at camera_ hi mom! and the HTML spec
writers who included the INS and DEL tags and of course, jQuery. I love you
jQuery!

(any feedback is welcome)

~~~
whimsy
There doesn't seem to be much correlation between buttons and what happens on
the page.

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.2)
Gecko/20090729 Firefox/3.5.2

For example, if I click on one revision (Gerry Giraffe) and then on the next
(Kramer Koala) stuff happens, but if I click back on Gerry, nothing happens.
Perhaps further instructions are required.

~~~
omouse
Yeah, right now I have it displaying the changes. The trouble is I don't have
an ordering for the versions. Gerry Giraffe doesn't depend on Kramer Koala.
I'll fix that up though so that it toggles the changes. Might turn them into
checkboxes to make it clearer?

------
AndrewO
The <ins> and <del> tags have always seemed weird to me in that they talk
about the document's history, rather than the document itself, or what the
document is talking about. The problem I've always seen with using them for
version control is, what happens when the document you're trying to version
control has <ins> and <del> tags?

I suppose you'd have the same problem if you put a diff under version control,
but it seems like this kind of thing implies that there should be something
different about those tags (I'd say another namespace, but those have been
abused enough already).

I don't know how/if I'd solve this, I'm just wondering if anyone else feels
the same.

~~~
olavk
They are not supposed to be used for versioning HTML documents. For example
they cannot indicate if you change the HTML head or if you change markup. What
they can indicate, is changes in _content_.

I don't think you should necessarily _store_ versioning history of content
with INS and DEL tags. If you have a CMS you might have each historic version
of content. If the user requests a diff, you can generate it automatically by
comparing versions, but you can represent that diff for the user by using INS
and DEL elements.

~~~
omouse
It's beautiful that this is the one spot where the W3C got the
content/presentation separation correctly.

* but you can represent that diff for the user by using INS and DEL elements.*

This would be false. No thank you. The whole point of including the datetime
attribute is to allow for storing the versions _in_ the document itself. HTML
should never be hand-coded and should only be interacted with via a good
editor. However, there aren't too many of those around.

The default web browser behaviour for dealing with the INS and DEL elements is
incorrect and the cause of it is a lack of understanding of what those
elements are for and why they were included in the spec.

------
kwamenum86
How the heck does this thing work? Looks like it has some nice bells and
whistles- wish I knew how to ring/blow them.

~~~
omouse
It stores versions of the document within the document itself via the INS and
DEL elements.

Each date up at the top as various changes associated with it. On each day,
changes were made to the document. By clicking show/hide you can toggle the
changes from that day. By clicking Apply Changes, you can apply all changes up
until that day (so if you're applying changes up till day 3, it will apply the
changes from day 1 and 2 as well). Play Through Changes does the same thing,
however it pauses for a second or two between the changes so you can visually
see the changes (fade in/out of the elements).

Applying all changes will run through everything and give you the "final"
version of the document.

I'll include a better explanation on the website itself, I was just tired as
heck at 4am ;)

------
rw
Needs JS to work (there's no warning about that) and... this is awesome.

~~~
omouse
Ah sorry, I'll include that as well.

