1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 21:08:12 +01:00

Fix gF for URIs with fragment identifiers

This commit is contained in:
Kris Maglione
2009-01-24 01:13:23 -05:00
parent 86d1d34a64
commit a29e5246d1

View File

@@ -866,9 +866,16 @@ function Buffer() //{{{
/**
* @property {string} The current top-level document's URL.
*/
get URL()
get URL() window.content.location.href,
/**
* @property {string} The current top-level document's URL, sans any
* fragment identifier.
*/
get URI()
{
return window.content.document.location.href;
let loc = window.content.location;
return loc.href.substr(0, loc.href.length - loc.hash.length);
},
/**
@@ -1450,7 +1457,7 @@ function Buffer() //{{{
*/
viewSource: function (url, useExternalEditor)
{
url = url || buffer.URL;
url = url || buffer.URI;
if (useExternalEditor)
editor.editFileExternally(url);