From fdf003e7a9159f2613449c0fdd6e5814f94c9ff4 Mon Sep 17 00:00:00 2001 From: Sibo Jia Date: Thu, 15 Feb 2018 10:48:39 +0800 Subject: [PATCH] change symbol in page title according to playing status (#105) --- js/app.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/app.js b/js/app.js index 6f57094..6de0ccb 100644 --- a/js/app.js +++ b/js/app.js @@ -825,6 +825,12 @@ }); $scope.$on('music:isPlaying', function(event, data) { + if (data) { + $rootScope.page_title = '▶' + $rootScope.page_title.slice(1); + } + else { + $rootScope.page_title = '⏸' + $rootScope.page_title.slice(1); + }; if (!lastfm.isAuthorized()) { return; }