📜 ⬆️ ⬇️

LJ Notifier - new comment notifications

In connection with the problems with the delivery of comments by mail, I wrote a small plugin for Google Chrome. Now it simply shows the number of new comments in the journal. If you click on the icon, a page with new comments will open, and the counter will be reset.

Update occurs once a minute. For the plug-in to work, you need to log in. If you are not logged in, you will see a gray cross, and clicking on the icon will open the LJ login page .

In future versions, new comments will be displayed in a drop-down box.
')
Link to plugin: LJ Notifier .

Several technical details


The extension uses the native comment export interface . At first I tried to do the authorization manually, but it turned out that XMLHttpRequest transmits browser cookies. Therefore, if you have already logged in to LiveJournal, then when you request pages through an extension, the magazine considers you logged in.

To remove the badge from the icon, you need to assign a blank line to the text value:

chrome.browserAction.setBadgeText({text: ''});

Some special difficulties in the development did not meet. It is a pleasure to write extensions for chromium: the entire infrastructure is well thought out and you only need to take care of solving the problem.

Source: https://habr.com/ru/post/78450/


All Articles