News for hackers. Stuff that matters.
Re:Desktop Notifications for console logs in browser by sheer_horror on Wednesday October 12, 2016 @12:07PM (#12694085)
During development, I have to check the browser's inspector periodically to see what my console.log()'s are saying. This leads to having two browser windows open: The browser and the inspector. And in the inspector, I usually only need to see the console. With these desktop notifications, I can develop and debug web apps with just two open windows: A single browser window and a terminal. And it's only adding ~100 lines to your project.
Re:Desktop Notifications for console logs in browser by callesgg on Wednesday October 12, 2016 @01:24PM (#12694825)
And what happens when it is a more complex object with many attributes?
Re:Desktop Notifications for console logs in browser by harkirat96 on Wednesday October 12, 2016 @12:13PM (#12694136)
Exactly :) Thanks for putting it out there
Re:Desktop Notifications for console logs in browser by harkirat96 on Wednesday October 12, 2016 @12:15PM (#12694154)
I'm adding this to the description
Re:Desktop Notifications for console logs in browser by GnarlyWhale on Wednesday October 12, 2016 @11:51AM (#12693927)
This is actually a really clever project, not sure why this is the first time I'm seeing something like this.
Re:Desktop Notifications for console logs in browser by azeirah on Wednesday October 12, 2016 @02:52PM (#12695534)
I made something similar once, I heavily advise against using it in its current state, it was just experimental, but it's kinda fun to play around with.

It's basically a floating console window with added features. It has two main functions

1. Notify, call loggy.notify to display a message right in your browser (instead of in the console) 2. call loggy(name, value), which is meant to track real-time values. For example your mouse position, say you loggy('mouse pos', mousePosition) on every `mousemove` event, it will show you the last value of `mousePosition` in the floating console window. It's like an fps tracker you see in games, constantly updating

It has some other useful features too, it shows diffs between objects every loggy(..) call, and some really weird features I forgot about.

It's fun to play around with, paste the gist in your console and then run this code as an example

var count = 1; setInterval(function () { loggy('hello', 5); count += 1; loggy.notify('we've counted ' + count + ' times now!'); }, 1000);

https://gist.github.com/Azeirah/0e558c439bd59646863a31540aa2...

Re:Desktop Notifications for console logs in browser by brak1 on Wednesday October 12, 2016 @02:25PM (#12695335)
Am i missing something here?

Wouldn't it be easier as a browser extension that just gives a notification every time console.log is called?

Re:Desktop Notifications for console logs in browser by rsoto on Wednesday October 12, 2016 @02:38PM (#12695431)
It can be both, just as Livereload: you can add it as a script, or as a extension (which adds that script)
Re:Desktop Notifications for console logs in browser by newtons_bodkin on Wednesday October 12, 2016 @12:56PM (#12694522)
Very neat. Plan to take a look at the source code later today. I was thinking of doing a chrome extension that accomplished the same goal, but just used a small pane on the bottom right instead of notifications.
Re:Desktop Notifications for console logs in browser by Globz on Wednesday October 12, 2016 @01:08PM (#12694660)
Great job, really useful!