diff --git a/app/model/Readme.md b/app/model/Readme.md index fd11f488..ba158430 100644 --- a/app/model/Readme.md +++ b/app/model/Readme.md @@ -18,8 +18,8 @@ Structure of a service entry: ### Setting the unread count -While by default the unread count is determined by looking for ` (COUNT)` to the window title, this describes the preferred way of doing it: +While by default the unread count is determined by looking for `(COUNT)` to the window title, this describes the preferred way of doing it: Code provided by `js_unread` will be injected into the service website. You can retrieve the unread count in this JavaScript code e.g. by parsing elements. -Set the unread count by calling `rambox.setUnreadCount(COUNT)` or clear it by calling `rambox.clearUnreadCount()`. +Set the unread count by calling `rambox.setUnreadCount(COUNT)` or clear it by calling `rambox.clearUnreadCount()`. diff --git a/app/ux/WebView.js b/app/ux/WebView.js index d7eb9e01..4b63200d 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -477,8 +477,7 @@ Ext.define('Rambox.ux.WebView',{ /** * Handles 'rambox.setUnreadCount' messages. - * Sets the badge text if the event contains an integer - * or a '•' (indicating non-zero but unknown number of unreads) as first argument. + * Sets the badge text if the event contains an integer or a '•' (indicating non-zero but unknown number of unreads) as first argument. * * @param event */ @@ -500,8 +499,7 @@ Ext.define('Rambox.ux.WebView',{ /** * Register page title update event listener only for services that don't specify a js_unread */ - if (Ext.getStore('ServicesList').getById(me.record.get('type')).get('js_unread') === '' && - me.record.get('js_unread') === '') { + if (Ext.getStore('ServicesList').getById(me.record.get('type')).get('js_unread') === '' && me.record.get('js_unread') === '') { webview.addEventListener("page-title-updated", function(e) { var count = e.title.match(/\(([^)]+)\)/); // Get text between (...) count = count ? count[1] : '0';