Compare commits

..

6 Commits

Author SHA1 Message Date
Ajay Ramachandran
7143d7532d Increase version number 2020-02-11 21:01:35 -05:00
Ajay Ramachandran
1f10bdf593 Merge pull request #279 from CommanderRoot/patch-1
Retain decimals in seconds value when editing sponsor times
2020-02-11 20:33:04 -05:00
CommanderRoot
3b543916ff Retain decimals in seconds value 2020-02-12 02:24:03 +01:00
Ajay Ramachandran
c4da85340a Merge pull request #277 from ajayyy/experimental
Fixed regex to support Firefox
2020-02-11 14:10:47 -05:00
Ajay Ramachandran
ec59c7e0f9 Increase version number. 2020-02-11 14:10:11 -05:00
Ajay Ramachandran
2454cd9a39 Fixed regex to support Firefox. 2020-02-11 12:29:19 -05:00
3 changed files with 5 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "__MSG_Name__",
"version": "1.2.9",
"version": "1.2.13",
"default_locale": "en",
"description": "__MSG_Description__",
"content_scripts": [{
@@ -67,4 +67,4 @@
"open_in_tab": true
},
"manifest_version": 2
}
}

View File

@@ -446,7 +446,7 @@ function sponsorsLookup(id: string, channelIDPromise?) {
//use the invidious api to get the time published
sendRequestToCustomServer('GET', "https://www.youtube.com/get_video_info?video_id=" + id, function(xmlhttp, error) {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
let decodedData = decodeURIComponent(xmlhttp.responseText).match(/(?<=player_response=)[^&]*/)[0];
let decodedData = decodeURIComponent(xmlhttp.responseText).match(/player_response=([^&]*)/)[1];
if (decodedData === undefined) {
console.error("[SB] Failed at getting video upload date info from YouTube.");

View File

@@ -671,7 +671,7 @@ async function runThePopup(messageListener?: MessageListener) {
let minutes = <HTMLInputElement> <unknown> document.getElementById(idStartName + "Minutes" + index);
let seconds = <HTMLInputElement> <unknown> document.getElementById(idStartName + "Seconds" + index);
return parseInt(minutes.value) * 60 + parseInt(seconds.value);
return parseInt(minutes.value) * 60 + parseFloat(seconds.value);
}
function saveSponsorTimeEdit(index, closeEditMode = true) {
@@ -1128,4 +1128,4 @@ if (chrome.tabs != undefined) {
runThePopup();
}
export default runThePopup;
export default runThePopup;