mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 19:37:59 +01:00
changed date in pageinfo to locale date format
This commit is contained in:
@@ -618,6 +618,12 @@ vimperator.Buffer = function() //{{{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var lastMod = new Date(window.content.document.lastModified).toLocaleString();
|
||||||
|
// FIXME: probably unportable across differnet language versions
|
||||||
|
if (lastMod == "Invalid Date")
|
||||||
|
lastMod = null;
|
||||||
|
|
||||||
|
|
||||||
// Ctrl-g single line output
|
// Ctrl-g single line output
|
||||||
if (!verbose)
|
if (!verbose)
|
||||||
{
|
{
|
||||||
@@ -628,7 +634,6 @@ vimperator.Buffer = function() //{{{
|
|||||||
if (pageSize[1])
|
if (pageSize[1])
|
||||||
info.push(pageSize[1] + "KiB");
|
info.push(pageSize[1] + "KiB");
|
||||||
|
|
||||||
var lastMod = window.content.document.lastModified.slice(0, -3);
|
|
||||||
if (lastMod)
|
if (lastMod)
|
||||||
info.push(lastMod);
|
info.push(lastMod);
|
||||||
|
|
||||||
@@ -655,10 +660,11 @@ vimperator.Buffer = function() //{{{
|
|||||||
if (pageSize[0])
|
if (pageSize[0])
|
||||||
pageGeneral.push(["File Size", pageSize[1] + "KiB (" + pageSize[0] + " bytes)"]);
|
pageGeneral.push(["File Size", pageSize[1] + "KiB (" + pageSize[0] + " bytes)"]);
|
||||||
|
|
||||||
pageGeneral.push(["Mime-Type", window.content.document.contentType]);
|
pageGeneral.push(["Mime-Type", content.document.contentType]);
|
||||||
pageGeneral.push(["Encoding", window.content.document.characterSet]);
|
pageGeneral.push(["Encoding", content.document.characterSet]);
|
||||||
pageGeneral.push(["Compatibility", content.document.compatMode == "BackCompat" ? "Quirks Mode" : "Full/Almost Standards Mode"]);
|
pageGeneral.push(["Compatibility", content.document.compatMode == "BackCompat" ? "Quirks Mode" : "Full/Almost Standards Mode"]);
|
||||||
pageGeneral.push(["Last Modified", window.content.document.lastModified]); //TODO: do not show bogus times (=current time)
|
if (lastMod)
|
||||||
|
pageGeneral.push(["Last Modified", lastMod]);
|
||||||
|
|
||||||
// get meta tag data, sort and put into pageMeta[]
|
// get meta tag data, sort and put into pageMeta[]
|
||||||
var metaNodes = window.content.document.getElementsByTagName("meta");
|
var metaNodes = window.content.document.getElementsByTagName("meta");
|
||||||
|
|||||||
Reference in New Issue
Block a user