- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 24 Oct 2011 11:56:59 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec-author-view In directory hutz:/tmp/cvs-serv6156 Modified Files: fragment-links.js Log Message: typo (whatwg r6730) [updated by splitter] Index: fragment-links.js =================================================================== RCS file: /sources/public/html5/spec-author-view/fragment-links.js,v retrieving revision 1.376 retrieving revision 1.377 diff -u -d -r1.376 -r1.377 --- fragment-links.js 24 Oct 2011 10:57:23 -0000 1.376 +++ fragment-links.js 24 Oct 2011 11:56:54 -0000 1.377 @@ -2,4 +2,10 @@ var fragid = window.location.hash.substr(1); if (!fragid) { /* handle section-foo.html links from the old multipage version, and broken foo.html from the new version */ - \ No newline at end of file + var m = window.location.pathname.match(/\/(?:section-)?([\w\-]+)\.html/); + if (m) fragid = m[1]; +} +var page = fragment_links[fragid]; +if (page) { + window.location.replace(page+'.html#'+fragid); +}
Received on Monday, 24 October 2011 11:57:01 UTC