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

@ -51,9 +51,9 @@
const node = document.createElement("li");
node.className = "domainPrints collapsable collapsed";
node.appendChild(this.textNode());
node.appendChild(document.createElement("br"));
createCollapser(node);
node.appendChild(this.notificationsNode());
node.appendChild(this.actionsNode());
this.node = function(){
return node;
@ -69,6 +69,7 @@
DomainNotification.prototype.textNode = function textNode(){
const node = document.createElement("span");
node.className = "text";
this.textNode = function(){
return node;
};
@ -77,7 +78,8 @@
while (messageParts.length){
var urlSpan = document.createElement("span");
urlSpan.textContent = this.domain;
urlSpan.className = "url";
urlSpan.className = "url hasHiddenActions";
urlSpan.appendChild(this.actionsNode());
node.appendChild(urlSpan);
node.appendChild(document.createTextNode(messageParts.shift()));
}
@ -113,6 +115,7 @@
DomainNotification.prototype.actionsNode = function actionsNode(){
const node = document.createElement("div");
node.className = "actions";
createActionButtons(node, actions, this.domain);
this.actionsNode = function(){
return node;