diff --git a/template/index.html b/template/index.html index 3309655..fbb42ef 100644 --- a/template/index.html +++ b/template/index.html @@ -2,7 +2,7 @@ - YARR + yarr! diff --git a/template/static/javascripts/app.js b/template/static/javascripts/app.js index 2e2cd07..e0864c7 100644 --- a/template/static/javascripts/app.js +++ b/template/static/javascripts/app.js @@ -1,5 +1,7 @@ 'use strict'; +var TITLE = document.title + DOMPurify.addHook('afterSanitizeAttributes', function (node) { // set all elements owning target to target=_blank if ('target' in node) { @@ -186,6 +188,16 @@ var vm = new Vue({ }, }, watch: { + 'feedStats': { + deep: true, + handler: debounce(function() { + var title = TITLE + if (this.totalStats.unread) { + title += ' ('+this.totalStats.unread+')' + } + document.title = title + }, 500), + }, 'filterSelected': function(newVal, oldVal) { if (oldVal === null) return // do nothing, initial setup api.settings.update({filter: newVal}).then(this.refreshItems.bind(this))