1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Improved design of the page action display.

This commit is contained in:
kkapsner 2017-10-14 12:24:53 +02:00
parent 03bf34d092
commit ae0763cfe6
14 changed files with 614 additions and 13 deletions

View file

@ -22,16 +22,17 @@
node(){
const node = document.createElement("li");
node.appendChild(document.createTextNode(this.timestamp.toLocaleString() + ": " + this.functionName + " "));
node.appendChild(document.createTextNode(this.timestamp.toLocaleString() + ": "));
node.appendChild(this.textNode());
if (this.dataURL){
node.className = "notification collapsable collapsed";
node.appendChild(document.createElement("br"));
createCollapser(node);
const img = document.createElement("img");
img.src = this.dataURL;
img.className = "collapsing";
img.className = "fakedCanvasContent collapsing";
node.appendChild(img);
}
node.appendChild(this.actionsNode());
this.node = function(){
return node;
@ -39,6 +40,19 @@
return node;
}
textNode(){
const node = document.createElement("span");
node.className = "text hasHiddenActions";
this.textNode = function(){
return node;
};
node.textContent = this.functionName;
node.title = this.url.href;
node.appendChild(this.actionsNode());
return node;
}
actionsNode(){
const node = document.createElement("div");