notification-logger
notification-logger copied to clipboard
Bookmarklet
Using the following javascript one may include and init the notification logger at any page without having to put dev-only dependencies or script tags into the code:
if (typeof window.logger === 'undefined') {
var script = document.createElement('script');
script.src = 'http://singhharkirat.com/notification-logger/notification-logger.js';
document.body.appendChild(script);
}
window.logger.init();
Putting that as a bookmarklet link and you've got a quick way to activate notification-logger on any page:
<a href="javascript:if(typeof window.logger=='undefined'){var script=document.createElement('script');script.src='http://singhharkirat.com/notification-logger/notification-logger.js';document.body.appendChild(script);}window.logger.init();">Bookmarklet</a>
Maybe you want to add that to the description page.
Wouldn't that bookmarklet need to be clicked every time the page is refreshed?
Yes, that's correct. The document change is only temporarily.
An alternative to overcome this could be a browser extension that performs the "insertion" on every page load. But that might be a