Add a &moreDom=1 option that puts <a> in <div> like before
This commit is contained in:
parent
7223c418a8
commit
e7db0735cc
@ -704,6 +704,11 @@ var JobRenderInfo = function(logWindow, logSegment, statsElements, jobNote, line
|
|||||||
|
|
||||||
|
|
||||||
var Reusable = {
|
var Reusable = {
|
||||||
|
obj_className_line_normal: {"className": "line-normal"},
|
||||||
|
obj_className_line_error: {"className": "line-error"},
|
||||||
|
obj_className_line_warning: {"className": "line-warning"},
|
||||||
|
obj_className_line_redirect: {"className": "line-redirect"},
|
||||||
|
//
|
||||||
obj_className_line_ignore: {"className": "line-ignore"},
|
obj_className_line_ignore: {"className": "line-ignore"},
|
||||||
obj_className_line_stdout: {"className": "line-stdout"},
|
obj_className_line_stdout: {"className": "line-stdout"},
|
||||||
obj_className_bold: {"className": "bold"}
|
obj_className_bold: {"className": "bold"}
|
||||||
@ -935,6 +940,27 @@ JobsRenderer.prototype._renderDownloadLine = function(data, logSegment) {
|
|||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Like _renderDownloadLine, but makes it easier to start a text selection from the
|
||||||
|
* left or right of the URL.
|
||||||
|
*/
|
||||||
|
JobsRenderer.prototype._moreDomRenderDownloadLine = function(data, logSegment) {
|
||||||
|
if(data["is_warning"]) {
|
||||||
|
var attrs = Reusable.obj_className_line_warning;
|
||||||
|
} else if(data["is_error"]) {
|
||||||
|
var attrs = Reusable.obj_className_line_error;
|
||||||
|
} else if(data["response_code"] && data["response_code"] >= 300 && data["response_code"] < 400) {
|
||||||
|
var attrs = Reusable.obj_className_line_redirect;
|
||||||
|
} else {
|
||||||
|
var attrs = Reusable.obj_className_line_normal;
|
||||||
|
}
|
||||||
|
logSegment.appendChild(h("div", attrs, [
|
||||||
|
data["response_code"] + " " + data["wget_code"] + " ",
|
||||||
|
href(data["url"], data["url"])
|
||||||
|
]));
|
||||||
|
return 1;
|
||||||
|
};
|
||||||
|
|
||||||
JobsRenderer.prototype._renderIgnoreLine = function(data, logSegment) {
|
JobsRenderer.prototype._renderIgnoreLine = function(data, logSegment) {
|
||||||
var attrs = Reusable.obj_className_line_ignore;
|
var attrs = Reusable.obj_className_line_ignore;
|
||||||
logSegment.appendChild(h("div", attrs, [
|
logSegment.appendChild(h("div", attrs, [
|
||||||
@ -1422,10 +1448,19 @@ var Dashboard = function() {
|
|||||||
* (also in Firefox if you paste capability settings into your prefs.js?)
|
* (also in Firefox if you paste capability settings into your prefs.js?)
|
||||||
*/
|
*/
|
||||||
(isChrome && getChromeMajorVersion() >= 42);
|
(isChrome && getChromeMajorVersion() >= 42);
|
||||||
|
var moreDom =
|
||||||
|
args["moreDom"] ?
|
||||||
|
Boolean(Number(args["moreDom"])) :
|
||||||
|
false;
|
||||||
// Append to page title to make it possible to identify the tab in Chrome's task manager
|
// Append to page title to make it possible to identify the tab in Chrome's task manager
|
||||||
if(args["title"]) {
|
if(args["title"]) {
|
||||||
document.title += " - " + args["title"];
|
document.title += " - " + args["title"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(moreDom) {
|
||||||
|
JobsRenderer.prototype._renderDownloadLine = JobsRenderer.prototype._moreDomRenderDownloadLine;
|
||||||
|
}
|
||||||
|
|
||||||
this.host = args["host"] ? args["host"] : location.host;
|
this.host = args["host"] ? args["host"] : location.host;
|
||||||
this.dumpTraffic = args["dumpMax"] && Number(args["dumpMax"]) > 0;
|
this.dumpTraffic = args["dumpMax"] && Number(args["dumpMax"]) > 0;
|
||||||
if(this.dumpTraffic) {
|
if(this.dumpTraffic) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user