Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions loge.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<html>
<head>
<style>
body {
font-size: 40px;
color: indianred;
font-family: 'Comic Sans MS', cursive;
}

.doge {
width: 600px;
position: absolute;
top: 60%;
text-align: center;
}
</style>
</head>

<body>
<div class="doge">
web inspector?
</div>

<script src="loge.js"></script>
</body>
</html>
19 changes: 15 additions & 4 deletions loge.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,21 @@
}

if (isChrome) {
completeResult = results.join('');
var temp = results;
results = [];
results.push('%c%s');
results.push('font-family: Comic Sans MS; line-height: 2em; font-size: 1.5em; color: ' + randomColor());
results.push(completeResult);
var format = '';
for(var i = 0; i < temp.length; i++){
format = format + '%c%s';
}

results.push(format);

for(var i = 0; i < temp.length; i++){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

following the surrounding code, the format of this should be for (var i = 0; i < temp.length; i++) {

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protip: most folks prefer for (var i = 0, len = temp.length; i < len; i++) {

var color = randomColor();
results.push('font-family: Comic Sans MS; line-height: 2em; font-size: 1.5em; color: ' + color);
results.push(temp[i] + ',');
}

}

console.log.apply(console, results);
Expand Down Expand Up @@ -224,3 +234,4 @@
exports.console.loge = loge;

})(this);