mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-13 06:57:09 +03:00
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -72,8 +72,8 @@ jobs:
|
|||||||
run: sudo apt-get install rename
|
run: sudo apt-get install rename
|
||||||
- name: Install signed file
|
- name: Install signed file
|
||||||
run: cd ./web-ext-artifacts
|
run: cd ./web-ext-artifacts
|
||||||
run: rename 's/.*/FirefoxSignedInstaller.xpi/' *
|
- run: rename 's/.*/FirefoxSignedInstaller.xpi/' *
|
||||||
run: cd ..
|
- run: cd ..
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: FirefoxExtensionSigned.xpi
|
name: FirefoxExtensionSigned.xpi
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "__MSG_fullName__",
|
"name": "__MSG_fullName__",
|
||||||
"short_name": "__MSG_Name__",
|
"short_name": "__MSG_Name__",
|
||||||
"version": "1.2.28",
|
"version": "1.2.28.1",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"description": "__MSG_Description__",
|
"description": "__MSG_Description__",
|
||||||
"content_scripts": [{
|
"content_scripts": [{
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
if (this.configUpdateListener) {
|
if (this.configUpdateListener) {
|
||||||
Config.configListeners.splice(Config.configListeners.indexOf(this.configUpdate.bind(this)));
|
Config.configListeners.splice(Config.configListeners.indexOf(this.configUpdate.bind(this)), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -281,6 +281,16 @@ async function migrateOldFormats() {
|
|||||||
|
|
||||||
Config.config.whitelistedChannels = newChannelList;
|
Config.config.whitelistedChannels = newChannelList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if off-topic category needs to be removed
|
||||||
|
for (let i = 0; i < Config.config.categorySelections.length; i++) {
|
||||||
|
if (Config.config.categorySelections[i].name === "offtopic") {
|
||||||
|
Config.config.categorySelections.splice(i, 1);
|
||||||
|
// Call set listener
|
||||||
|
Config.config.categorySelections = Config.config.categorySelections;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setupConfig() {
|
async function setupConfig() {
|
||||||
|
|||||||
@@ -1130,13 +1130,16 @@ function getRoughCurrentTime(): number {
|
|||||||
let htmlCurrentTimeString = document.querySelector(".ytp-time-current").textContent;
|
let htmlCurrentTimeString = document.querySelector(".ytp-time-current").textContent;
|
||||||
let htmlDurationString = document.querySelector(".ytp-time-duration").textContent;
|
let htmlDurationString = document.querySelector(".ytp-time-duration").textContent;
|
||||||
|
|
||||||
// Used to check if endscreen content is visible
|
if (htmlCurrentTimeString == htmlDurationString) {
|
||||||
let endScreenContent = document.querySelector(".ytp-endscreen-content");
|
// At the end of the video
|
||||||
// Used to check autoplay display
|
return video.duration;
|
||||||
let autoPlayDisplay: HTMLDivElement = document.querySelector(".ytp-upnext");
|
}
|
||||||
|
|
||||||
if (htmlCurrentTimeString == htmlDurationString
|
// Used to check if replay button
|
||||||
|| endScreenContent.childElementCount > 0 || autoPlayDisplay.style.display !== "none") {
|
let playButtonSVGData = document.querySelector("ytp-play-button")?.querySelector("ytp-svg-fill")?.getAttribute("d");
|
||||||
|
let replaceSVGData = "M 18,11 V 7 l -5,5 5,5 v -4 c 3.3,0 6,2.7 6,6 0,3.3 -2.7,6 -6,6 -3.3,0 -6,-2.7 -6,-6 h -2 c 0,4.4 3.6,8 8,8 4.4,0 8,-3.6 8,-8 0,-4.4 -3.6,-8 -8,-8 z";
|
||||||
|
|
||||||
|
if (playButtonSVGData === replaceSVGData) {
|
||||||
// At the end of the video
|
// At the end of the video
|
||||||
return video.duration;
|
return video.duration;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user