[cvs-annodex] commit (/annodex): AnnodexFirefoxExtension/trunk/chrome/afeview/content/afeview.js

andre nobody at lists.annodex.net
Fri Jan 21 02:07:36 EST 2005


Update of /annodex (new revision 688)

Modified files:
   AnnodexFirefoxExtension/trunk/chrome/afeview/content/afeview.js

Log Message:
AnnodexFirefoxExtension:
 * Pressing the Back button now takes you to 2 seconds before the location where you initiated the hyperlink

Modified: AnnodexFirefoxExtension/trunk/chrome/afeview/content/afeview.js
===================================================================
--- AnnodexFirefoxExtension/trunk/chrome/afeview/content/afeview.js	2005-01-20 14:58:21 UTC (rev 687)
+++ AnnodexFirefoxExtension/trunk/chrome/afeview/content/afeview.js	2005-01-20 15:07:34 UTC (rev 688)
@@ -747,7 +747,11 @@
   // Change any server-side ?t= time URI schemes to a client-side # scheme
   href = href.replace(/\?t\=/, "#");
 
-  var timeInSeconds = MediaEngine.getTimeInSeconds();
+  // Store a URL with a timed URI 2 seconds before the user followed the
+  // hyperlink, so we get a bit of context back.  (This improves usability
+  // for me, anyway ...)
+  var timeInSeconds = MediaEngine.getTimeInSeconds() - 2;
+  if (timeInSeconds < 0) timeInSeconds = 0;
   var currentURL = document.location.href.replace(/#.*$/, "") + "#" + timeInSeconds;
 
   // Ooo looky here, evil hack!  Mozilla's content loading doesn't actually


-- 
andre



More information about the cvs-annodex mailing list