<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -222,7 +222,7 @@ GnuBook.prototype.drawLeafsOnePage = function() {
     }
 
     var firstLeafToDraw  = leafsToDisplay[0];
-    window.location.hash = firstLeafToDraw;    
+    window.location.replace('#' + firstLeafToDraw);
     this.firstIndex      = firstLeafToDraw;
 
     if ((0 != firstLeafToDraw) &amp;&amp; (1 &lt; this.reduce)) {
@@ -381,7 +381,7 @@ GnuBook.prototype.updatePageNumBox2UP = function() {
     } else {
         $(&quot;#GBpagenum&quot;).val('');
     }
-    window.location.hash = this.currentLeafL; 
+    window.location.replace('#' + this.currentLeafL); 
 }
 
 // loadLeafs()</diff>
      <filename>GnuBook/GnuBook.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>bb421792d69d9b6ceaa5bb9477b741e5b0b12a45</id>
    </parent>
  </parents>
  <author>
    <name>Alex Osborne</name>
    <email>aosborne@nla.gov.au</email>
  </author>
  <url>http://github.com/ato/bookreader/commit/7858770c9a3d34a7c7f86bd2b92a646e11d2b944</url>
  <id>7858770c9a3d34a7c7f86bd2b92a646e11d2b944</id>
  <committed-date>2009-02-14T02:59:50-08:00</committed-date>
  <authored-date>2009-02-14T02:59:50-08:00</authored-date>
  <message>Use location.replace for URL changes to fix back-button problems.

By using location.replace instead of location.hash to update the URL a
new history entry is not created, so the back button will now behave
as the user expects an return to the page before the bookreader.

This should work for IE and Firefox, but apparantly may not for WebKit
based browsers, as location.replace behaves differently for them.  See
these reported WebKit bugs:

https://bugs.webkit.org/show_bug.cgi?id=20355
https://bugs.webkit.org/show_bug.cgi?id=20425
https://bugs.webkit.org/show_bug.cgi?id=22224

This fix (at least partially) addresses these GnuBook bugs:

https://bugs.launchpad.net/gnubook/+bug/300521
https://bugs.launchpad.net/gnubook/+bug/294281
https://bugs.launchpad.net/gnubook/+bug/272022</message>
  <tree>bec7984b09a4f03db924ff436bebf70be2e15668</tree>
  <committer>
    <name>Alex Osborne</name>
    <email>aosborne@nla.gov.au</email>
  </committer>
</commit>
