Просмотр исходного кода

newer playback history events overwrite the old title of the video

sometimes (it seems) the video would start to play before the document
title had been updated, leading videos in the history to be stored under
the previous video's title - to fix this, instead of saving the title
only once (the first time), it saves the title every time a change in
playback occurs
Brandon Wong 1 год назад
Родитель
Сommit
1bd1ce43c1
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      background.js

+ 1 - 0
background.js

@@ -219,6 +219,7 @@ async function updateHistory(message) {
         history: {
         history: {
           [v]: {
           [v]: {
             ...existing,
             ...existing,
+            title: message.title,
             duration:
             duration:
               !isNaN(existing.duration) && isFinite(existing.duration)
               !isNaN(existing.duration) && isFinite(existing.duration)
                 ? Math.max(message.duration, existing.duration)
                 ? Math.max(message.duration, existing.duration)