common keyboard javascript include
[sheet.git] / vim.plp
diff --git a/vim.plp b/vim.plp
index 3ae41b1f8ddf0b6a23527a0523de5b204b1184d4..183a04a7b081f0c4ea9fdf38387f5c27dca16216 100644 (file)
--- a/vim.plp
+++ b/vim.plp
@@ -43,35 +43,9 @@ $header{content_type} = $ctype;
                if $showkeys and $get{keys} eq 'ghost';
 :>
 <link rel="vcs" type="git" href="git://dev.shiar.nl/sheet">
+<script type="text/javascript" src="/keys.js"></script>
 
-<script><!--
-function setmode(classname) {
-       // set style for each #rows>li>ul>li to display:none unless it matches classname
-       var showclass = classname ? ' '+classname+'(?!\\w)' : '^$';
-       var parentskip = /^keys/;
-       var row = document.getElementById('rows').firstChild;
-       do {
-               if (row.tagName == 'LI' && row.firstChild.tagName == 'UL'
-               && !row.firstChild.className.match(parentskip)) {
-                       var el = row.firstChild.firstChild;
-                       if (el) do {
-                               if (el.tagName == 'LI') {
-                                       el.style.display = el.className.match(showclass) ? 'block' : 'none';
-                               }
-                       } while (el = el.nextSibling);
-               }
-       } while (row = row.nextSibling);
-
-       // update H2 to reflect the first part of a currently active (but hidden) H3
-       var h3s = document.getElementsByTagName('H3');
-       for (var i = 0; i < h3s.length; i++) {
-               if (h3s[i].parentNode.style.display != 'block') continue;
-               document.getElementsByTagName('H2')[0].innerHTML = h3s[i].firstChild.data;
-       }
-} // setmode
-//--></script>
-
-<body>
+<body id="vim">
 
 <h1>vi/vim cheat sheet</h1>