From 5a30f4c983fbbfbd25c6921186e1eb769c1a35b6 Mon Sep 17 00:00:00 2001 From: Jorys_Paulin Date: Sat, 9 Jun 2018 10:45:27 +0200 Subject: [PATCH] Added "Running" title when hovering running game --- static/js/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/static/js/index.js b/static/js/index.js index a302173..8cef2e9 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -439,7 +439,13 @@ function removeClicked(host) { function stylizeBoxArt(freshApi, appIdToStylize) { // If the running game is the good one then style it var el = document.querySelector("#game-" + appIdToStylize); - return (freshApi.currentGame === appIdToStylize) ? el.classList.add('current-game') : el.classList.remove('current-game') + if(freshApi.currentGame === appIdToStylize) { + el.classList.add('current-game') + el.title += ' (Running)' + } else { + el.classList.remove('current-game') + el.title.replace(' (Running)', '') // TODO: Replace with localized string so make it e.title = game_title + } } function sortTitles(list, sortOrder) {