From fe926ab10aeb155ce5d4cf26314b8f9cc75e98b7 Mon Sep 17 00:00:00 2001 From: Robson Andrade Date: Wed, 4 Aug 2021 12:13:59 -0300 Subject: [PATCH 1/2] Make sure that image will not repeat --- console.image.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console.image.js b/console.image.js index a3c29db..fc01c19 100644 --- a/console.image.js +++ b/console.image.js @@ -164,7 +164,7 @@ img.onload = function() { var dim = getBox(this.width * scale, this.height * scale); - console.log("%c" + dim.string, dim.style + "background: url(" + url + "); background-size: " + (this.width * scale) + "px " + (this.height * scale) + "px; color: transparent;"); + console.log("%c" + dim.string, dim.style + "background: url(" + url + "); background-size: " + (this.width * scale) + "px " + (this.height * scale) + "px; color: transparent; background-repeat: no-repeat;"); }; img.src = url; From d50f0c714f287e071b9de7cf4345af582c5c3a79 Mon Sep 17 00:00:00 2001 From: Robson Andrade Date: Thu, 14 Oct 2021 09:21:40 -0300 Subject: [PATCH 2/2] Make sure that will not repeat image --- console.image.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/console.image.js b/console.image.js index fc01c19..1f04a2a 100644 --- a/console.image.js +++ b/console.image.js @@ -22,7 +22,7 @@ function getBox(width, height) { return { string: "+", - style: "font-size: 1px; padding: " + Math.floor(height/2) + "px " + Math.floor(width/2) + "px; line-height: " + height + "px;" + style: "font-size: 1px; padding: " + Math.floor(height/2) + "px " + Math.floor(width/2) + "px;" } } @@ -164,7 +164,7 @@ img.onload = function() { var dim = getBox(this.width * scale, this.height * scale); - console.log("%c" + dim.string, dim.style + "background: url(" + url + "); background-size: " + (this.width * scale) + "px " + (this.height * scale) + "px; color: transparent; background-repeat: no-repeat;"); + console.log("%c" + dim.string, dim.style + "background: url(" + url + ") no-repeat; background-size: " + (this.width * scale) + "px " + (this.height * scale) + "px; color: transparent;"); }; img.src = url;