diff options
author | Ajay Ramachandran <[email protected]> | 2019-08-27 21:01:48 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2019-08-27 21:01:48 -0400 |
commit | 4e795c8fb145ab06948bf28e2178a5237087c7b3 (patch) | |
tree | 65bb65bb206797460d7bf34bac8a00fba4c0ca63 | |
parent | 5891fccacb40f4814ec198119400b7e9452771a3 (diff) | |
parent | c83eb589ea372906ca34201c3a43bd77a05e977a (diff) | |
download | SponsorBlock-1.1.7.tar.gz SponsorBlock-1.1.7.zip |
Merge pull request #139 from ajayyy/experimental-ajay1.1.7
Fixed preview bar causing issues
-rw-r--r-- | _locales/en/messages.json | 12 | ||||
-rw-r--r-- | content.js | 10 | ||||
-rw-r--r-- | manifest.json | 2 |
3 files changed, 19 insertions, 5 deletions
diff --git a/_locales/en/messages.json b/_locales/en/messages.json index f4a08de1..3501b831 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -135,5 +135,17 @@ }, "submitCheck": { "message": "Are you sure you want to submit this?" + }, + "longDescription": { + "message": "SponsorBlock is an extension that will skip over sponsored segments of YouTube videos. SponsorBlock is a crowdsourced browser extension that let's anyone submit the start and end time's of sponsored segments of YouTube videos. Once one person submits this information, everyone else with this extension will skip right over the sponsored segment.", + "description": "Full description of the extension on the store pages." + }, + "website": { + "message": "Website", + "description": "Used on Firefox Store Page" + }, + "sourceCode": { + "message": "Source Code", + "description": "Used on Firefox Store Page" } } @@ -238,8 +238,10 @@ function videoIDChange(id) { //setup the preview bar if (previewBar == null) { //create it - let progressBar = document.getElementsByClassName("ytp-progress-bar-container")[0] || document.getElementsByClassName("no-model cue-range-markers")[0]; - previewBar = new PreviewBar(progressBar); + wait(getControls).then(result => { + let progressBar = document.getElementsByClassName("ytp-progress-bar-container")[0] || document.getElementsByClassName("no-model cue-range-markers")[0]; + previewBar = new PreviewBar(progressBar); + }); } //warn them if they had unsubmitted times @@ -271,7 +273,7 @@ function videoIDChange(id) { sponsorsLookup(id); //make sure everything is properly added - updateVisibilityOfPlayerControlsButton(true); + updateVisibilityOfPlayerControlsButton(); //reset sponsor times submitting sponsorTimesSubmitting = []; @@ -412,7 +414,7 @@ function updatePreviewBar() { types.push("previewSponsor"); } - previewBar.set(allSponsorTimes, types, v.duration); + wait(() => previewBar !== null).then((result) => previewBar.set(allSponsorTimes, types, v.duration)); //update last video id lastPreviewBarUpdate = sponsorVideoID; diff --git a/manifest.json b/manifest.json index 2e883ddf..83eb5041 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "__MSG_Name__", - "version": "1.1.6", + "version": "1.1.7", "default_locale": "en", "description": "__MSG_Description__", "content_scripts": [ |