diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e902a81d..50ec9d43 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,9 +18,6 @@ jobs: - name: Copy configuration run: cp config.json.example config.json - - name: Install Zip - run: sudo apt-get install zip - # Create Chrome artifacts - name: Create Chrome artifacts run: npm run build:chrome @@ -30,9 +27,7 @@ jobs: path: dist - run: mkdir ./builds - name: Zip Artifacts - run: cd ./dist - - run: zip -r ../builds/ChromeExtension.zip * - - run: cd ../ + run: cd ./dist ; zip -r ../builds/ChromeExtension.zip * # Create Firefox artifacts - name: Create Firefox artifacts @@ -42,11 +37,7 @@ jobs: name: FirefoxExtension path: dist - name: Zip Artifacts - run: cd ./dist - - uses: montudor/action-zip@v0.1.0 - with: - args: zip -r ../builds/FirefoxExtension.zip * - - run: cd ../ + run: cd ./dist ; zip -r ../builds/FirefoxExtension.zip * # Create Beta artifacts (Builds with the name changed to beta) - name: Create Chrome Beta artifacts @@ -56,9 +47,7 @@ jobs: name: ChromeExtensionBeta path: dist - name: Zip Artifacts - run: cd ./dist - - run: zip -r ../builds/ChromeExtensionBeta.zip * - - run: cd ../ + run: cd ./dist ; zip -r ../builds/ChromeExtensionBeta.zip * - name: Create Firefox Beta artifacts run: npm run build:firefox -- --env.stream=beta @@ -67,9 +56,7 @@ jobs: name: FirefoxExtensionBeta path: dist - name: Zip Artifacts - run: cd ./dist - - run: zip -r ../builds/FirefoxExtensionBeta.zip * - - run: cd ../ + run: cd ./dist ; zip -r ../builds/FirefoxExtensionBeta.zip * # Create Firefox Signed Beta version - name: Create Firefox Signed Beta artifacts @@ -80,9 +67,7 @@ jobs: - name: Install rename run: sudo apt-get install rename - name: Install signed file - run: cd ./web-ext-artifacts - - run: rename 's/.*/FirefoxSignedInstaller.xpi/' * - - run: cd .. + run: cd ./web-ext-artifacts ; rename 's/.*/FirefoxSignedInstaller.xpi/' * - uses: actions/upload-artifact@v1 with: name: FirefoxExtensionSigned.xpi diff --git a/manifest/manifest.json b/manifest/manifest.json index 6c077f83..a64cbb13 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "__MSG_Name__", - "version": "1.2.28.3", + "version": "1.2.28.4", "default_locale": "en", "description": "__MSG_Description__", "content_scripts": [{ diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 864b957b..b9859414 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -35,9 +35,6 @@ "Segments": { "message": "sponsor segments" }, - "noticeTitle": { - "message": "Sponsor Skipped" - }, "reportButtonTitle": { "message": "Report" }, @@ -71,6 +68,9 @@ "paused": { "message": "Paused" }, + "manualPaused": { + "message": "Timer Stopped" + }, "confirmMSG": { "message": "To edit or delete individual values, click the info button or open the extension popup by clicking the extension icon in the top right corner." }, @@ -272,12 +272,12 @@ "errorCode": { "message": "Error Code: " }, - "noticeTitleNotSkipped": { - "message": "Skip Sponsor?" - }, "skip": { "message": "Skip" }, + "skipped": { + "message": "Skipped" + }, "disableAutoSkip": { "message": "Disable Auto Skip" }, @@ -559,7 +559,7 @@ "message": "Consider Enabling Force Channel Check Before Skipping Sponsors" }, "downvoteDescription": { - "message": "Incorrect" + "message": "Incorrect/Wrong Timing" }, "incorrectCategory": { "message": "Wrong Category" diff --git a/src/components/NoticeComponent.tsx b/src/components/NoticeComponent.tsx index b7ff8adf..f5e3a7af 100644 --- a/src/components/NoticeComponent.tsx +++ b/src/components/NoticeComponent.tsx @@ -23,6 +23,7 @@ export interface NoticeState { countdownTime: number, countdownText: string, + countdownManuallyPaused: boolean, } class NoticeComponent extends React.Component { @@ -55,6 +56,7 @@ class NoticeComponent extends React.Component { //the countdown until this notice closes countdownTime: maxCountdownTime(), countdownText: null, + countdownManuallyPaused: false } } @@ -71,8 +73,8 @@ class NoticeComponent extends React.Component { + onMouseEnter={() => this.timerMouseEnter()} + onMouseLeave={() => this.timerMouseLeave()}> {/* First row */} @@ -99,6 +101,7 @@ class NoticeComponent extends React.Component { {/* Time left */} {this.props.timed ? ( this.toggleManualPause()} className="sponsorSkipObject sponsorSkipNoticeTimeLeft"> {this.state.countdownText || (this.state.countdownTime + "s")} @@ -121,6 +124,30 @@ class NoticeComponent extends React.Component { ); } + timerMouseEnter() { + if (this.state.countdownManuallyPaused) return; + + this.pauseCountdown(); + } + + timerMouseLeave() { + if (this.state.countdownManuallyPaused) return; + + this.startCountdown(); + } + + toggleManualPause() { + this.setState({ + countdownManuallyPaused: !this.state.countdownManuallyPaused + }, () => { + if (this.state.countdownManuallyPaused) { + this.pauseCountdown(); + } else { + this.startCountdown(); + } + }); + } + //called every second to lower the countdown before hiding the notice countdown() { if (!this.props.timed) return; @@ -159,7 +186,7 @@ class NoticeComponent extends React.Component { //reset countdown and inform the user this.setState({ countdownTime: this.state.maxCountdownTime(), - countdownText: chrome.i18n.getMessage("paused") + countdownText: this.state.countdownManuallyPaused ? chrome.i18n.getMessage("manualPaused") : chrome.i18n.getMessage("paused") }); //remove the fade out class if it exists diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index e1ecf01c..602b0ffc 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -62,10 +62,10 @@ class SkipNoticeComponent extends React.Component @@ -319,7 +324,7 @@ class SkipNoticeComponent extends React.Component