in the popup menu, in the main view, each video has an actions menu. add an option to mark that video as "done" (if it's anything other than "done"), or to remove the status if it is "done". add this option to the sub-menus of the playlist-specific view as well.
Added functionality to toggle the "done" status of videos in both the main playlist view and the individual playlist view. The implementation includes:
Added toggleVideoDoneStatus method in popup/popup.js:
Added isVideoDone helper method in popup/popup.js:
Added toggleVideoDoneButton handler in popup/popup.js:
toggleVideoDoneStatus and closes menusUpdated updatePlaylistsForDisplay and updateCurrentPlaylistVideos methods:
doneButtonText property for CSP complianceUpdated HTML templates in popup/popup.html:
doneButtonText property instead of JavaScript expressionsvideo.status === 'done' ? ... : ...The done status is stored as a status: "done" property on video objects. When removing done status, the property is deleted rather than set to a different value, maintaining consistency with the existing codebase logic that checks for video.status === "done".
The implementation maintains full CSP compliance by pre-computing button text in JavaScript methods rather than using expressions in HTML attributes.