console.image icon indicating copy to clipboard operation
console.image copied to clipboard

console.image log twice in console log

Open afiqiqmal opened this issue 5 years ago • 3 comments

console.image log twice in console log

console.meme("Not sure if memes in dev tools is stupid", "or disastrous.", "Not Sure Fry");

see this screenshot : https://image.ibb.co/jqWope/Screen_Shot_2018_09_05_at_4_08_49_PM.png

afiqiqmal avatar Sep 05 '18 08:09 afiqiqmal

same issue here

Mehvix avatar Oct 11 '18 04:10 Mehvix

I'm not sure what the actual solution is, since it seems to be related to Chrome changing how things work in the console, but I have found how to fix it if you're comfortable changing the code on your end.

In the getBox method, padding is applied to make room for the image, and the top/bottom padding is what's making the box too big and causing the background to repeat. If you change the following line:

style: "font-size: 1px; padding: " + Math.floor(height/2) + "px " + Math.floor(width/2) + "px; line-height: " + height + "px;"

to

style: "font-size: 1px; padding: 0 " + Math.floor(width/2) + "px; line-height: " + height + "px;"

then it will work as normal.

nchutchind avatar Dec 26 '18 21:12 nchutchind

In case you are lazy you can use this fork I found. It works quite crudely (by dividing height by 2...) but works nonetheless. See #22

cyqsimon avatar Jan 29 '21 08:01 cyqsimon