Created
December 23, 2019 10:00
-
-
Save mohitmayank/054693bbbd602cdf917fe34dcce96ff3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function printI(url, msg, ascale) { | |
var scale = ascale || 0.5; | |
var img = new Image(); | |
img.onload = function imageOnload() { | |
var h = this.height * scale; | |
var w = this.width * scale; | |
console.log('%c+', 'color:transparent;font-size:0.1px;background:url('+url+');background-size:'+w+'px '+h+'px;padding:'+h+'px '+w+'px 0 0;'); | |
console.log(msg || ''); | |
}; | |
img.src = url; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment