[cvs-annodex] commit (/annodex):
AnnodexFirefoxExtension/trunk/Core/chrome/afeview/content/afeview.js
AnnodexFirefoxExtension/trunk/Core/components/ANXLoader.js
andre
nobody at lists.annodex.net
Fri Apr 22 15:18:39 EST 2005
Update of /annodex (new revision 1285)
Modified files:
AnnodexFirefoxExtension/trunk/Core/chrome/afeview/content/afeview.js
AnnodexFirefoxExtension/trunk/Core/components/ANXLoader.js
Log Message:
AnnodexFirefoxExtension:
* Fix bugs introduced in changeset:1284 that caused the extension to not work at all
Modified: AnnodexFirefoxExtension/trunk/Core/chrome/afeview/content/afeview.js
===================================================================
--- AnnodexFirefoxExtension/trunk/Core/chrome/afeview/content/afeview.js 2005-04-22 04:20:06 UTC (rev 1284)
+++ AnnodexFirefoxExtension/trunk/Core/chrome/afeview/content/afeview.js 2005-04-22 05:18:35 UTC (rev 1285)
@@ -82,7 +82,8 @@
// use
if (SourceURL.indexOf("?t=") != -1)
{
- RequestedFragment = SourceURL.slice( SourceURL.indexOf("?t=") + 1 );
+ RequestedFragment = SourceURL.slice( SourceURL.indexOf("?t=") + 3 );
+ SourceURL = SourceURL.slice( 0, SourceURL.indexOf("?t=") );
dump("RequestedFragment is " + RequestedFragment + "\n");
}
@@ -323,7 +324,7 @@
if (document.location.search.indexOf("?t=") != -1)
{
RequestedFragment = document.location.search
- .slice( document.location.search.indexOf("?t=") + 1);
+ .slice( document.location.search.indexOf("?t=") + 3);
}
else
{
@@ -926,7 +927,7 @@
// need to do an explicit "seekTo(clipStart)" here, because by setting
// document.location.href, the updateInterface() loop will detect the
// change in the location bar and jump there automatically within 500ms.
- var previousUrl = SourceURL + "#" + nptTimeString(clipStart, false);
+ var previousUrl = SourceURL + "?t=" + nptTimeString(clipStart, false);
document.location.href = previousUrl;
}
@@ -981,7 +982,7 @@
var href = resolveURL(SourceURL, aHref);
// Change any server-side ?t= time URI schemes to a client-side # scheme
- href = href.replace(/\?t\=/, "#");
+ href = href.replace(/\?t\=/, "?t=");
// 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
@@ -989,7 +990,7 @@
var timeInSeconds = MediaEngine.getTimeInSeconds() - 2;
if (timeInSeconds < 0) timeInSeconds = 0;
var currentURL = document.location.href.replace(/#.*$/, "")
- + "#" + timeInSeconds;
+ + "?t=" + timeInSeconds;
// Update the document title to display the time the user followed the
// hyperlink, so that the browsing history looks correct
@@ -1165,7 +1166,7 @@
function sendLink (aEvent)
{
var timeInSeconds = MediaEngine.getTimeInSeconds();
- var url = SourceURL + "#" + nptTimeString(timeInSeconds, false);
+ var url = SourceURL + "?t=" + nptTimeString(timeInSeconds, false);
dump("Opening send link dialog box with URL: " + url + "\n");
Modified: AnnodexFirefoxExtension/trunk/Core/components/ANXLoader.js
===================================================================
--- AnnodexFirefoxExtension/trunk/Core/components/ANXLoader.js 2005-04-22 04:20:06 UTC (rev 1284)
+++ AnnodexFirefoxExtension/trunk/Core/components/ANXLoader.js 2005-04-22 05:18:35 UTC (rev 1285)
@@ -79,12 +79,6 @@
// Convert a server-side timed URI query (e.g. ?t=15) to a client-side
// timed URI query (e.g. #15).
var url = request.name;
- var serverSideTimeQueryIndex = url.indexOf("?t=");
- if (serverSideTimeQueryIndex != -1)
- {
- var timeOffset = url.slice(serverSideTimeQueryIndex + 3 /* length("?t=") */);
- url = url.slice(0, serverSideTimeQueryIndex) + "#" + timeOffset;
- }
window._content.location.href = "chrome://afeview/content/afeview.xul?" + url;
// What follows is a whole bunch of code I tried putting in to hide the
--
andre
More information about the cvs-annodex
mailing list