MCPcopy Create free account
hub / github.com/Cicada000/VV / handleCardClick

Function handleCardClick

Web/script.js:1147–1162  ·  view source on GitHub ↗
(result)

Source from the content-addressed store, hash-verified

1145 observer.observe(trigger);
1146}
1147function handleCardClick(result) {
1148 const episodeMatch = result.filename.match(/\[P(\d+)\]/);
1149 const timeMatch = result.timestamp.match(/^(\d+)m(\d+)s$/);
1150 if (episodeMatch && timeMatch) {
1151 const episodeNum = parseInt(episodeMatch[1], 10);
1152 const minutes = parseInt(timeMatch[1]);
1153 const seconds = parseInt(timeMatch[2]);
1154 const totalSeconds = minutes * 60 + seconds;
1155 for (const [url, filename] of Object.entries(mapping))
1156 if (filename === result.filename) {
1157 const videoUrl = `https://www.bilibili.com${url}?t=${totalSeconds}`;
1158 window.open(videoUrl, "_blank");
1159 break;
1160 }
1161 }
1162}
1163function enableKeywordTags() {
1164 const keywordsContainer = document.getElementById("keywordsContainer");
1165 keywordsContainer.querySelectorAll('.keyword-tag').forEach(tag => {

Callers 1

displayResultsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected