Add date validation when storing frames, Fix viewing page info when aborting with **
This commit is contained in:
17
load/page.js
17
load/page.js
@@ -145,6 +145,7 @@ function Page(debug) {
|
||||
|
||||
key: [], // Key actions
|
||||
raw: {}, // Page raw content for each session type
|
||||
date: undefined, // Date of frame
|
||||
};
|
||||
|
||||
this.__defaults__ = {
|
||||
@@ -284,6 +285,20 @@ function Page(debug) {
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(this,'date',{
|
||||
get: function() {
|
||||
if (this.__properties__.date !== undefined)
|
||||
return strftime("%a, %d %b %Y %I:%M:%S %z",this.__properties__.date);
|
||||
},
|
||||
|
||||
set: function(int) {
|
||||
if (typeof int !== 'number')
|
||||
throw new Error('DATE must be a epoch');
|
||||
|
||||
return this.__properties__.date = int;
|
||||
}
|
||||
});
|
||||
|
||||
Page.prototype.__defineGetter__('dimensions',function() {
|
||||
return this.__properties__.width+' X '+this.__properties__.height;
|
||||
});
|
||||
@@ -1315,7 +1330,7 @@ function Page(debug) {
|
||||
to: this.name,
|
||||
from: 'SYSTEM',
|
||||
tags: this.name,
|
||||
date: strftime("%a, %d %b %Y, %I:%M:%S %Z",this.date),
|
||||
date: this.date,
|
||||
subject: 'Content',
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user