Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e70a8c724b | ||
|
|
9d46c2d048 | ||
|
|
25236f3a19 | ||
|
|
bcfe4924e2 | ||
|
|
60b9266a2a | ||
|
|
9392d16617 |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "__MSG_fullName__",
|
||||
"short_name": "SponsorBlock",
|
||||
"version": "2.0.15.1",
|
||||
"version": "2.0.16",
|
||||
"default_locale": "en",
|
||||
"description": "__MSG_Description__",
|
||||
"content_scripts": [{
|
||||
@@ -24,10 +24,11 @@
|
||||
"web_accessible_resources": [
|
||||
"icons/LogoSponsorBlocker256px.png",
|
||||
"icons/IconSponsorBlocker256px.png",
|
||||
"icons/PlayerStartIconSponsorBlocker256px.png",
|
||||
"icons/PlayerStopIconSponsorBlocker256px.png",
|
||||
"icons/PlayerUploadIconSponsorBlocker256px.png",
|
||||
"icons/PlayerUploadFailedIconSponsorBlocker256px.png",
|
||||
"icons/PlayerStartIconSponsorBlocker.svg",
|
||||
"icons/PlayerStopIconSponsorBlocker.svg",
|
||||
"icons/PlayerUploadIconSponsorBlocker.svg",
|
||||
"icons/PlayerUploadFailedIconSponsorBlocker.svg",
|
||||
"icons/PlayerCancelSegmentIconSponsorBlocker.svg",
|
||||
"icons/settings.svg",
|
||||
"icons/pencil.svg",
|
||||
"icons/check.svg",
|
||||
@@ -39,8 +40,8 @@
|
||||
"icons/report.png",
|
||||
"icons/close.png",
|
||||
"icons/beep.ogg",
|
||||
"icons/PlayerInfoIconSponsorBlocker256px.png",
|
||||
"icons/PlayerDeleteIconSponsorBlocker256px.png",
|
||||
"icons/PlayerInfoIconSponsorBlocker.svg",
|
||||
"icons/PlayerDeleteIconSponsorBlocker.svg",
|
||||
"popup.html",
|
||||
"content.css"
|
||||
],
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"Loading": {
|
||||
"message": "በመጫን ላይ..."
|
||||
},
|
||||
"paused": {
|
||||
"message": "ለአፍታ አቁም"
|
||||
},
|
||||
"success": {
|
||||
"message": "ተሳክቷል!"
|
||||
},
|
||||
"Username": {
|
||||
"message": "መለያ ስም"
|
||||
}
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
"sponsorEnd": {
|
||||
"message": "Koniec segmentu"
|
||||
},
|
||||
"sponsorCancel": {
|
||||
"message": "Zrušiť vytváranie segmentu"
|
||||
},
|
||||
"noVideoID": {
|
||||
"message": "Nenašlo sa žiadne YouTube video.\nAk je to chyba, obnovte záložku."
|
||||
},
|
||||
@@ -582,12 +585,18 @@
|
||||
"channelDataNotFound": {
|
||||
"message": "ID kanála nie je zatiaľ načítané."
|
||||
},
|
||||
"videoInfoFetchFailed": {
|
||||
"message": "Zdá sa, že niečo blokuje SponsorBlocku možnosť získať dáta o videu. Prosím navštívte https://github.com/ajayyy/SponsorBlock/issues/741 pre viac informácií."
|
||||
},
|
||||
"youtubePermissionRequest": {
|
||||
"message": "SponsorBlock nemá prístup k YouTube API. Povoľte oprávnenie v nasledovnej výzve, počkajte pár sekúnd a znovu nahrajte stránku."
|
||||
},
|
||||
"acceptPermission": {
|
||||
"message": "Povoľte oprávnenie"
|
||||
},
|
||||
"permissionRequestSuccess": {
|
||||
"message": "Oprávnenie bolo úspešne povolené!"
|
||||
},
|
||||
"permissionRequestFailed": {
|
||||
"message": "Povolenie oprávnenia zlyhalo, stlačili ste odmietnuť?"
|
||||
},
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
"sponsorEnd": {
|
||||
"message": "片段現在結束"
|
||||
},
|
||||
"sponsorCancel": {
|
||||
"message": "取消創建片段"
|
||||
},
|
||||
"noVideoID": {
|
||||
"message": "找不到 YouTube 影片。\n如果這是不正確的,重新整理此分頁"
|
||||
},
|
||||
|
||||
67
public/icons/PlayerCancelSegmentIconSponsorBlocker.svg
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 565.15 568"
|
||||
version="1.1"
|
||||
id="svg16"
|
||||
sodipodi:docname="PlayerCancelSegmentIconSponsorBlocker.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
inkscape:export-filename="D:\Dell Data\_Projects\_____SponsorSkip\ignored\svg\SponsorBlocker4.png"
|
||||
inkscape:export-xdpi="43.436523"
|
||||
inkscape:export-ydpi="43.436523">
|
||||
<metadata
|
||||
id="metadata20">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>LogoSponsorBlocker2</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1001"
|
||||
id="namedview18"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.83098592"
|
||||
inkscape:cx="-238.41697"
|
||||
inkscape:cy="258.22009"
|
||||
inkscape:window-x="477"
|
||||
inkscape:window-y="961"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg16" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<style
|
||||
id="style2">.cls-1{fill:red;}.cls-2{fill:#fff;}</style>
|
||||
</defs>
|
||||
<title
|
||||
id="title6">LogoSponsorBlocker2</title>
|
||||
<path
|
||||
class="cls-1"
|
||||
d="m 282.58,568 a 65,65 0 0 1 -34.14,-9.66 C 95.41,463.94 2.54,300.46 0,121 a 64.91,64.91 0 0 1 34,-58.09 522.56,522.56 0 0 1 497.16,0 64.91,64.91 0 0 1 34,58.12 c -2.53,179.43 -95.4,342.91 -248.42,437.3 A 65,65 0 0 1 282.58,568 Z m 0,-548.31 A 502.24,502.24 0 0 0 43.4,80.22 45.27,45.27 0 0 0 19.7,120.75 c 2.44,172.67 91.81,330 239.07,420.83 a 46.19,46.19 0 0 0 47.61,0 C 453.64,450.73 543,293.42 545.45,120.75 A 45.26,45.26 0 0 0 521.75,80.21 502.26,502.26 0 0 0 282.58,19.69 Z"
|
||||
id="path8"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
d="M 284.70508 42.693359 A 479.9 479.9 0 0 0 54.369141 100.41992 A 22.53 22.53 0 0 0 42.669922 120.41992 C 45.069922 290.25992 135.67008 438.63977 270.83008 522.00977 A 22.48 22.48 0 0 0 294.32031 522.00977 C 429.48031 438.63977 520.08047 290.25992 522.48047 120.41992 A 22.53 22.53 0 0 0 510.7793 100.41992 A 479.9 479.9 0 0 0 284.70508 42.693359 z M 224.94922 162.35352 L 282.57422 219.98047 L 340.20117 162.35352 L 384.33984 206.49219 L 326.71484 264.11719 L 384.33984 321.74414 L 340.20117 365.88281 L 282.57422 308.25781 L 224.94922 365.88281 L 180.81055 321.74414 L 238.4375 264.11719 L 180.81055 206.49219 L 224.94922 162.35352 z "
|
||||
id="path10" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
88
public/icons/PlayerDeleteIconSponsorBlocker.svg
Normal file
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 565.15 568"
|
||||
version="1.1"
|
||||
id="svg16"
|
||||
sodipodi:docname="PlayerDeleteIconSponsorBlocker.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
inkscape:export-filename="D:\Dell Data\_Projects\_____SponsorSkip\ignored\svg\SponsorBlocker4.png"
|
||||
inkscape:export-xdpi="43.436523"
|
||||
inkscape:export-ydpi="43.436523">
|
||||
<metadata
|
||||
id="metadata20">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>LogoSponsorBlocker2</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1001"
|
||||
id="namedview18"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.83098592"
|
||||
inkscape:cx="209.2657"
|
||||
inkscape:cy="235.85704"
|
||||
inkscape:window-x="477"
|
||||
inkscape:window-y="961"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg16" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<style
|
||||
id="style2">.cls-1{fill:red;}.cls-2{fill:#fff;}</style>
|
||||
</defs>
|
||||
<title
|
||||
id="title6">LogoSponsorBlocker2</title>
|
||||
<path
|
||||
class="cls-1"
|
||||
d="m 282.58,568 a 65,65 0 0 1 -34.14,-9.66 C 95.41,463.94 2.54,300.46 0,121 a 64.91,64.91 0 0 1 34,-58.09 522.56,522.56 0 0 1 497.16,0 64.91,64.91 0 0 1 34,58.12 c -2.53,179.43 -95.4,342.91 -248.42,437.3 A 65,65 0 0 1 282.58,568 Z m 0,-548.31 A 502.24,502.24 0 0 0 43.4,80.22 45.27,45.27 0 0 0 19.7,120.75 c 2.44,172.67 91.81,330 239.07,420.83 a 46.19,46.19 0 0 0 47.61,0 C 453.64,450.73 543,293.42 545.45,120.75 A 45.26,45.26 0 0 0 521.75,80.21 502.26,502.26 0 0 0 282.58,19.69 Z"
|
||||
id="path8"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
d="M 284.70508 42.693359 A 479.9 479.9 0 0 0 54.369141 100.41992 A 22.53 22.53 0 0 0 42.669922 120.41992 C 45.069922 290.25992 135.67008 438.63977 270.83008 522.00977 A 22.48 22.48 0 0 0 294.32031 522.00977 C 429.48031 438.63977 520.08047 290.25992 522.48047 120.41992 A 22.53 22.53 0 0 0 510.7793 100.41992 A 479.9 479.9 0 0 0 284.70508 42.693359 z M 184.84375 113.77344 L 380.30664 113.77344 L 380.30664 161.31836 L 184.84375 161.31836 L 184.84375 113.77344 z M 184.84375 174.45703 L 380.30469 174.45703 L 380.30469 430.16992 L 184.84375 430.16992 L 184.84375 174.45703 z "
|
||||
id="path10" />
|
||||
<g
|
||||
id="g849"
|
||||
transform="matrix(1.1485222,0,0,1.1485222,-41.968703,-56.737897)"
|
||||
style="fill:#ffffff">
|
||||
<g
|
||||
id="g869"
|
||||
style="fill:#ffffff">
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.84762007;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 223.01024,230.22964 H 245.1343 V 395.01181 H 223.01024 Z"
|
||||
id="rect857" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.84762007;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 271.51297,230.22964 h 22.12406 v 164.78217 h -22.12406 z"
|
||||
id="rect859" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.84762007;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 317.46292,230.22964 h 22.12406 v 164.78217 h -22.12406 z"
|
||||
id="rect861" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 11 KiB |
120
public/icons/PlayerInfoIconSponsorBlocker.svg
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 565.15 568"
|
||||
version="1.1"
|
||||
id="svg16"
|
||||
sodipodi:docname="PlayerInfoIconSponsorBlocker.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
inkscape:export-filename="D:\Dell Data\_Projects\_____SponsorSkip\ignored\svg\SponsorBlocker4.png"
|
||||
inkscape:export-xdpi="43.436523"
|
||||
inkscape:export-ydpi="43.436523">
|
||||
<metadata
|
||||
id="metadata20">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>LogoSponsorBlocker2</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1001"
|
||||
id="namedview18"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.83098592"
|
||||
inkscape:cx="203.60203"
|
||||
inkscape:cy="226.95062"
|
||||
inkscape:window-x="477"
|
||||
inkscape:window-y="961"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg16" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<style
|
||||
id="style2">.cls-1{fill:red;}.cls-2{fill:#fff;}</style>
|
||||
</defs>
|
||||
<title
|
||||
id="title6">LogoSponsorBlocker2</title>
|
||||
<path
|
||||
class="cls-1"
|
||||
d="m 282.58,568 a 65,65 0 0 1 -34.14,-9.66 C 95.41,463.94 2.54,300.46 0,121 a 64.91,64.91 0 0 1 34,-58.09 522.56,522.56 0 0 1 497.16,0 64.91,64.91 0 0 1 34,58.12 c -2.53,179.43 -95.4,342.91 -248.42,437.3 A 65,65 0 0 1 282.58,568 Z m 0,-548.31 A 502.24,502.24 0 0 0 43.4,80.22 45.27,45.27 0 0 0 19.7,120.75 c 2.44,172.67 91.81,330 239.07,420.83 a 46.19,46.19 0 0 0 47.61,0 C 453.64,450.73 543,293.42 545.45,120.75 A 45.26,45.26 0 0 0 521.75,80.21 502.26,502.26 0 0 0 282.58,19.69 Z"
|
||||
id="path8"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
d="M 284.70508 42.693359 A 479.9 479.9 0 0 0 54.369141 100.41992 A 22.53 22.53 0 0 0 42.669922 120.41992 C 45.069922 290.25992 135.67008 438.63977 270.83008 522.00977 A 22.48 22.48 0 0 0 294.32031 522.00977 C 429.48031 438.63977 520.08047 290.25992 522.48047 120.41992 A 22.53 22.53 0 0 0 510.7793 100.41992 A 479.9 479.9 0 0 0 284.70508 42.693359 z M 282.57422 102.03711 C 371.92182 102.03711 444.65625 174.74933 444.65625 264.11719 C 444.65625 353.48504 371.92182 426.19922 282.57422 426.19922 C 193.20636 426.19922 120.49414 353.48504 120.49414 264.11719 C 120.49414 174.74933 193.20636 102.03711 282.57422 102.03711 z M 282.57422 132.42578 C 209.96157 132.42578 150.88281 191.50454 150.88281 264.11719 C 150.88281 336.72984 209.96157 395.80859 282.57422 395.80859 C 355.18687 395.80859 414.26562 336.72984 414.26562 264.11719 C 414.26562 191.50454 355.18687 132.42578 282.57422 132.42578 z M 280.01172 149.12109 C 294.1331 149.12109 304.375 159.72726 304.375 173.16992 C 304.375 186.6531 294.10302 196.60156 279.67773 196.60156 C 264.94855 196.60156 255.32422 186.6531 255.32422 173.16992 C 255.32422 159.72726 264.94824 149.12109 280.01172 149.12109 z M 245.07422 217.8125 L 302.4707 217.8125 L 302.45117 352.50391 L 320.74609 353.47656 L 320.74609 379.11523 L 244.42578 379.11523 L 244.42578 354.74219 L 255.01172 353.78906 C 260.76562 353.15087 264.29102 351.21646 264.29102 343.51758 L 264.29102 254.36328 C 264.29102 247.28233 262.3858 245.04297 256.27734 245.04297 L 245.07422 244.41406 L 245.07422 217.8125 z "
|
||||
id="path10" />
|
||||
<g
|
||||
id="g883"
|
||||
transform="matrix(10.130113,0,0,10.130113,45.728213,14.587871)"
|
||||
style="fill:#ffffff">
|
||||
<g
|
||||
id="g827"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g829"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g831"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g833"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g835"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g837"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g839"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g841"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g843"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g845"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g847"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g849"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g851"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g853"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g855"
|
||||
style="fill:#ffffff" />
|
||||
<g
|
||||
id="g857"
|
||||
style="fill:#ffffff" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 15 KiB |
71
public/icons/PlayerStartIconSponsorBlocker.svg
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 565.15 568"
|
||||
version="1.1"
|
||||
id="svg16"
|
||||
sodipodi:docname="PlayerStartIconSponsorBlocker.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||
<metadata
|
||||
id="metadata20">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1001"
|
||||
id="namedview18"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.83098592"
|
||||
inkscape:cx="-0.3618106"
|
||||
inkscape:cy="322.44266"
|
||||
inkscape:window-x="477"
|
||||
inkscape:window-y="961"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Layer_1-2" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<style
|
||||
id="style2">.cls-1{fill:red;}.cls-2{fill:#fff;}</style>
|
||||
</defs>
|
||||
<title
|
||||
id="title6">LogoSponsorBlocker2</title>
|
||||
<g
|
||||
id="Layer_2"
|
||||
data-name="Layer 2">
|
||||
<g
|
||||
id="Layer_1-2"
|
||||
data-name="Layer 1"
|
||||
style="fill:#ffffff">
|
||||
<path
|
||||
class="cls-1"
|
||||
d="M282.58,568a65,65,0,0,1-34.14-9.66C95.41,463.94,2.54,300.46,0,121A64.91,64.91,0,0,1,34,62.91a522.56,522.56,0,0,1,497.16,0,64.91,64.91,0,0,1,34,58.12c-2.53,179.43-95.4,342.91-248.42,437.3A65,65,0,0,1,282.58,568Zm0-548.31A502.24,502.24,0,0,0,43.4,80.22a45.27,45.27,0,0,0-23.7,40.53c2.44,172.67,91.81,330,239.07,420.83a46.19,46.19,0,0,0,47.61,0C453.64,450.73,543,293.42,545.45,120.75a45.26,45.26,0,0,0-23.7-40.54A502.26,502.26,0,0,0,282.58,19.69Z"
|
||||
id="path8"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
d="M 284.70508 42.693359 A 479.9 479.9 0 0 0 54.369141 100.41992 A 22.53 22.53 0 0 0 42.669922 120.41992 C 45.069922 290.25992 135.67008 438.63977 270.83008 522.00977 A 22.48 22.48 0 0 0 294.32031 522.00977 C 429.48031 438.63977 520.08047 290.25992 522.48047 120.41992 A 22.53 22.53 0 0 0 510.7793 100.41992 A 479.9 479.9 0 0 0 284.70508 42.693359 z M 220.41016 145.74023 L 411.2793 255.93945 L 220.41016 366.14062 L 220.41016 145.74023 z "
|
||||
id="path10" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
67
public/icons/PlayerStopIconSponsorBlocker.svg
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 565.15 568"
|
||||
version="1.1"
|
||||
id="svg16"
|
||||
sodipodi:docname="PlayerStopIconSponsorBlocker.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
inkscape:export-filename="D:\Dell Data\_Projects\_____SponsorSkip\ignored\svg\SponsorBlocker4.png"
|
||||
inkscape:export-xdpi="43.436523"
|
||||
inkscape:export-ydpi="43.436523">
|
||||
<metadata
|
||||
id="metadata20">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>LogoSponsorBlocker2</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1001"
|
||||
id="namedview18"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.83098595"
|
||||
inkscape:cx="194.89884"
|
||||
inkscape:cy="305.06785"
|
||||
inkscape:window-x="477"
|
||||
inkscape:window-y="961"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg16" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<style
|
||||
id="style2">.cls-1{fill:red;}.cls-2{fill:#fff;}</style>
|
||||
</defs>
|
||||
<title
|
||||
id="title6">LogoSponsorBlocker2</title>
|
||||
<path
|
||||
class="cls-1"
|
||||
d="m 282.58,568 a 65,65 0 0 1 -34.14,-9.66 C 95.41,463.94 2.54,300.46 0,121 a 64.91,64.91 0 0 1 34,-58.09 522.56,522.56 0 0 1 497.16,0 64.91,64.91 0 0 1 34,58.12 c -2.53,179.43 -95.4,342.91 -248.42,437.3 A 65,65 0 0 1 282.58,568 Z m 0,-548.31 A 502.24,502.24 0 0 0 43.4,80.22 45.27,45.27 0 0 0 19.7,120.75 c 2.44,172.67 91.81,330 239.07,420.83 a 46.19,46.19 0 0 0 47.61,0 C 453.64,450.73 543,293.42 545.45,120.75 A 45.26,45.26 0 0 0 521.75,80.21 502.26,502.26 0 0 0 282.58,19.69 Z"
|
||||
id="path8"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
d="M 284.70508 42.693359 A 479.9 479.9 0 0 0 54.369141 100.41992 A 22.53 22.53 0 0 0 42.669922 120.41992 C 45.069922 290.25992 135.67008 438.63977 270.83008 522.00977 A 22.48 22.48 0 0 0 294.32031 522.00977 C 429.48031 438.63977 520.08047 290.25992 522.48047 120.41992 A 22.53 22.53 0 0 0 510.7793 100.41992 A 479.9 479.9 0 0 0 284.70508 42.693359 z M 187.11914 147.00977 L 378.03125 147.00977 L 378.03125 351.04102 L 187.11914 351.04102 L 187.11914 147.00977 z "
|
||||
id="path10" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
71
public/icons/PlayerUploadFailedIconSponsorBlocker.svg
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 565.15 568"
|
||||
version="1.1"
|
||||
id="svg16"
|
||||
sodipodi:docname="PlayerUploadFailedIconSponsorBlocker.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
inkscape:export-filename="D:\Dell Data\_Projects\_____SponsorSkip\ignored\svg\SponsorBlocker4.png"
|
||||
inkscape:export-xdpi="43.436523"
|
||||
inkscape:export-ydpi="43.436523">
|
||||
<metadata
|
||||
id="metadata20">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>LogoSponsorBlocker2</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1001"
|
||||
id="namedview18"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.83098592"
|
||||
inkscape:cx="-277.20441"
|
||||
inkscape:cy="286.71724"
|
||||
inkscape:window-x="477"
|
||||
inkscape:window-y="961"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg16" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<style
|
||||
id="style2">.cls-1{fill:red;}.cls-2{fill:#fff;}</style>
|
||||
</defs>
|
||||
<title
|
||||
id="title6">LogoSponsorBlocker2</title>
|
||||
<path
|
||||
class="cls-1"
|
||||
d="m 282.58,568 a 65,65 0 0 1 -34.14,-9.66 C 95.41,463.94 2.54,300.46 0,121 a 64.91,64.91 0 0 1 34,-58.09 522.56,522.56 0 0 1 497.16,0 64.91,64.91 0 0 1 34,58.12 c -2.53,179.43 -95.4,342.91 -248.42,437.3 A 65,65 0 0 1 282.58,568 Z m 0,-548.31 A 502.24,502.24 0 0 0 43.4,80.22 45.27,45.27 0 0 0 19.7,120.75 c 2.44,172.67 91.81,330 239.07,420.83 a 46.19,46.19 0 0 0 47.61,0 C 453.64,450.73 543,293.42 545.45,120.75 A 45.26,45.26 0 0 0 521.75,80.21 502.26,502.26 0 0 0 282.58,19.69 Z"
|
||||
id="path8"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
d="M 284.70508 42.693359 A 479.9 479.9 0 0 0 54.369141 100.41992 A 22.53 22.53 0 0 0 42.669922 120.41992 C 45.069922 290.25992 135.67008 438.63977 270.83008 522.00977 A 22.48 22.48 0 0 0 294.32031 522.00977 C 429.48031 438.63977 520.08047 290.25992 522.48047 120.41992 A 22.53 22.53 0 0 0 510.7793 100.41992 A 479.9 479.9 0 0 0 284.70508 42.693359 z M 282.57422 123.27344 C 302.2486 123.27344 318.08789 139.67142 318.08789 160.03906 L 318.08789 310.16211 C 318.08789 330.52975 302.2486 346.92773 282.57422 346.92773 C 262.89984 346.92773 247.0625 330.52975 247.0625 310.16211 L 247.0625 160.03906 C 247.0625 139.67142 262.89984 123.27344 282.57422 123.27344 z M 282.57422 373.71094 C 302.2487 373.71094 318.08789 389.55014 318.08789 409.22461 C 318.08789 428.89909 302.2487 444.73633 282.57422 444.73633 C 262.89975 444.73633 247.06055 428.89909 247.06055 409.22461 C 247.06055 389.55014 262.89975 373.71094 282.57422 373.71094 z "
|
||||
id="path10" />
|
||||
<g
|
||||
id="g821"
|
||||
transform="translate(0,32.491428)"
|
||||
style="fill:#ffffff" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 11 KiB |
67
public/icons/PlayerUploadIconSponsorBlocker.svg
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 565.15 568"
|
||||
version="1.1"
|
||||
id="svg16"
|
||||
sodipodi:docname="PlayerUploadIconSponsorBlocker.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
inkscape:export-filename="D:\Dell Data\_Projects\_____SponsorSkip\ignored\svg\SponsorBlocker4.png"
|
||||
inkscape:export-xdpi="43.436523"
|
||||
inkscape:export-ydpi="43.436523">
|
||||
<metadata
|
||||
id="metadata20">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>LogoSponsorBlocker2</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1001"
|
||||
id="namedview18"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.83098595"
|
||||
inkscape:cx="-374.9496"
|
||||
inkscape:cy="291.99093"
|
||||
inkscape:window-x="477"
|
||||
inkscape:window-y="961"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg16" />
|
||||
<defs
|
||||
id="defs4">
|
||||
<style
|
||||
id="style2">.cls-1{fill:red;}.cls-2{fill:#fff;}</style>
|
||||
</defs>
|
||||
<title
|
||||
id="title6">LogoSponsorBlocker2</title>
|
||||
<path
|
||||
class="cls-1"
|
||||
d="m 282.58,568 a 65,65 0 0 1 -34.14,-9.66 C 95.41,463.94 2.54,300.46 0,121 a 64.91,64.91 0 0 1 34,-58.09 522.56,522.56 0 0 1 497.16,0 64.91,64.91 0 0 1 34,58.12 c -2.53,179.43 -95.4,342.91 -248.42,437.3 A 65,65 0 0 1 282.58,568 Z m 0,-548.31 A 502.24,502.24 0 0 0 43.4,80.22 45.27,45.27 0 0 0 19.7,120.75 c 2.44,172.67 91.81,330 239.07,420.83 a 46.19,46.19 0 0 0 47.61,0 C 453.64,450.73 543,293.42 545.45,120.75 A 45.26,45.26 0 0 0 521.75,80.21 502.26,502.26 0 0 0 282.58,19.69 Z"
|
||||
id="path8"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
style="fill:#ffffff"
|
||||
d="M 284.70508 42.693359 A 479.9 479.9 0 0 0 54.369141 100.41992 A 22.53 22.53 0 0 0 42.669922 120.41992 C 45.069922 290.25992 135.67008 438.63977 270.83008 522.00977 A 22.48 22.48 0 0 0 294.32031 522.00977 C 429.48031 438.63977 520.08047 290.25992 522.48047 120.41992 A 22.53 22.53 0 0 0 510.7793 100.41992 A 479.9 479.9 0 0 0 284.70508 42.693359 z M 282.57422 112.11133 L 282.87109 112.11133 L 423.75977 365.75391 L 330.30273 365.75391 L 330.30273 409.21094 L 234.84766 409.21094 L 234.84766 365.75391 L 141.39062 365.75391 L 282.57422 112.11133 z "
|
||||
id="path10" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 12 KiB |
@@ -340,13 +340,8 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
deleteTime(): void {
|
||||
const sponsorTimes = this.props.contentContainer().sponsorTimesSubmitting;
|
||||
const index = this.props.index;
|
||||
const removingIncomplete = sponsorTimes[index].segment.length < 2;
|
||||
|
||||
//if it is not a complete sponsor time
|
||||
if (sponsorTimes[index].segment.length < 2) {
|
||||
//update video player
|
||||
this.props.contentContainer().updateEditButtonsOnPlayer();
|
||||
}
|
||||
|
||||
sponsorTimes.splice(index, 1);
|
||||
|
||||
//save this
|
||||
@@ -357,13 +352,16 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||
//if they are all removed
|
||||
if (sponsorTimes.length == 0) {
|
||||
this.props.submissionNotice.cancel();
|
||||
|
||||
//update video player
|
||||
this.props.contentContainer().updateEditButtonsOnPlayer();
|
||||
} else {
|
||||
//update display
|
||||
this.props.submissionNotice.forceUpdate();
|
||||
}
|
||||
|
||||
//if it is not a complete segment, or all are removed
|
||||
if (sponsorTimes.length === 0 || removingIncomplete) {
|
||||
//update video player
|
||||
this.props.contentContainer().updateEditButtonsOnPlayer();
|
||||
}
|
||||
}
|
||||
|
||||
configUpdate(): void {
|
||||
|
||||
@@ -410,7 +410,7 @@ function migrateOldFormats(config: SBConfig) {
|
||||
// Otherwise junk data
|
||||
if (Array.isArray(jsonData)) {
|
||||
const oldMap = new Map(jsonData);
|
||||
oldMap.forEach((sponsorTimes: number[][], key) => {
|
||||
oldMap.forEach((sponsorTimes: [number, number][], key) => {
|
||||
const segmentTimes: SponsorTime[] = [];
|
||||
for (const segment of sponsorTimes) {
|
||||
segmentTimes.push({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Config from "./config";
|
||||
|
||||
import { SponsorTime, IncompleteSponsorTime, CategorySkipOption, VideoID, SponsorHideType, FetchResponse, VideoInfo, StorageChangesObject } from "./types";
|
||||
import { SponsorTime, CategorySkipOption, VideoID, SponsorHideType, FetchResponse, VideoInfo, StorageChangesObject } from "./types";
|
||||
|
||||
import { ContentContainer } from "./types";
|
||||
import Utils from "./utils";
|
||||
@@ -84,9 +84,6 @@ utils.wait(() => Config.config !== null, 1000, 1).then(() => videoIDChange(getYo
|
||||
//this only happens if there is an error
|
||||
let sponsorLookupRetries = 0;
|
||||
|
||||
/** Currently timed segment, which will be added to the unsubmitted segments when ready. */
|
||||
let currentlyTimedSegment: IncompleteSponsorTime | null = null;
|
||||
|
||||
/** Segments created by the user which have not yet been submitted. */
|
||||
let sponsorTimesSubmitting: SponsorTime[] = [];
|
||||
|
||||
@@ -136,7 +133,7 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo
|
||||
startOrEndTimingNewSegment()
|
||||
|
||||
sendResponse({
|
||||
creatingSegment: currentlyTimedSegment !== null,
|
||||
creatingSegment: isSegmentCreationInProgress(),
|
||||
});
|
||||
|
||||
break;
|
||||
@@ -157,7 +154,7 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo
|
||||
case "getVideoID":
|
||||
sendResponse({
|
||||
videoID: sponsorVideoID,
|
||||
creatingSegment: currentlyTimedSegment !== null,
|
||||
creatingSegment: isSegmentCreationInProgress(),
|
||||
});
|
||||
|
||||
break;
|
||||
@@ -305,7 +302,6 @@ async function videoIDChange(id) {
|
||||
|
||||
// Clear unsubmitted segments from the previous video
|
||||
sponsorTimesSubmitting = [];
|
||||
currentlyTimedSegment = null;
|
||||
updateSponsorTimesSubmitting();
|
||||
}
|
||||
|
||||
@@ -1107,11 +1103,11 @@ async function createButtons(): Promise<void> {
|
||||
controls = await utils.wait(getControls).catch();
|
||||
|
||||
// Add button if does not already exist in html
|
||||
createButton("startSponsor", "sponsorStart", () => closeInfoMenuAnd(() => startOrEndTimingNewSegment()), "PlayerStartIconSponsorBlocker256px.png");
|
||||
createButton("cancelSponsor", "sponsorCancel", () => closeInfoMenuAnd(() => cancelCreatingSegment()), "PlayerUploadFailedIconSponsorBlocker256px.png");
|
||||
createButton("info", "openPopup", openInfoMenu, "PlayerInfoIconSponsorBlocker256px.png");
|
||||
createButton("delete", "clearTimes", () => closeInfoMenuAnd(() => clearSponsorTimes()), "PlayerDeleteIconSponsorBlocker256px.png");
|
||||
createButton("submit", "SubmitTimes", submitSponsorTimes, "PlayerUploadIconSponsorBlocker256px.png");
|
||||
createButton("startSponsor", "sponsorStart", () => closeInfoMenuAnd(() => startOrEndTimingNewSegment()), "PlayerStartIconSponsorBlocker.svg");
|
||||
createButton("cancelSponsor", "sponsorCancel", () => closeInfoMenuAnd(() => cancelCreatingSegment()), "PlayerCancelSegmentIconSponsorBlocker.svg");
|
||||
createButton("info", "openPopup", openInfoMenu, "PlayerInfoIconSponsorBlocker.svg");
|
||||
createButton("delete", "clearTimes", () => closeInfoMenuAnd(() => clearSponsorTimes()), "PlayerDeleteIconSponsorBlocker.svg");
|
||||
createButton("submit", "SubmitTimes", submitSponsorTimes, "PlayerUploadIconSponsorBlocker.svg");
|
||||
}
|
||||
|
||||
/** Creates any missing buttons on the player and updates their visiblity. */
|
||||
@@ -1144,13 +1140,13 @@ function updateEditButtonsOnPlayer(): void {
|
||||
|
||||
// Only check if buttons should be visible if they're enabled
|
||||
if (buttonsEnabled) {
|
||||
creatingSegment = currentlyTimedSegment !== null;
|
||||
creatingSegment = isSegmentCreationInProgress();
|
||||
|
||||
// Show only if there are any segments to submit
|
||||
submitButtonVisible = sponsorTimesSubmitting.length > 0;
|
||||
submitButtonVisible = sponsorTimesSubmitting.length > 1 || (sponsorTimesSubmitting.length > 0 && !creatingSegment);
|
||||
|
||||
// Show only if there are any segments to delete
|
||||
deleteButtonVisible = sponsorTimesSubmitting.length > 0;
|
||||
deleteButtonVisible = sponsorTimesSubmitting.length > 1 || (sponsorTimesSubmitting.length > 0 && !creatingSegment);
|
||||
}
|
||||
|
||||
// Update the elements
|
||||
@@ -1159,10 +1155,10 @@ function updateEditButtonsOnPlayer(): void {
|
||||
|
||||
if (buttonsEnabled) {
|
||||
if (creatingSegment) {
|
||||
playerButtons.startSponsor.image.src = chrome.extension.getURL("icons/PlayerStopIconSponsorBlocker256px.png");
|
||||
playerButtons.startSponsor.image.src = chrome.extension.getURL("icons/PlayerStopIconSponsorBlocker.svg");
|
||||
playerButtons.startSponsor.button.setAttribute("title", chrome.i18n.getMessage("sponsorEnd"));
|
||||
} else {
|
||||
playerButtons.startSponsor.image.src = chrome.extension.getURL("icons/PlayerStartIconSponsorBlocker256px.png");
|
||||
playerButtons.startSponsor.image.src = chrome.extension.getURL("icons/PlayerStartIconSponsorBlocker.svg");
|
||||
playerButtons.startSponsor.button.setAttribute("title", chrome.i18n.getMessage("sponsorStart"));
|
||||
}
|
||||
}
|
||||
@@ -1190,41 +1186,49 @@ function getRealCurrentTime(): number {
|
||||
}
|
||||
|
||||
function startOrEndTimingNewSegment() {
|
||||
if (!currentlyTimedSegment) {
|
||||
// Start a new segment
|
||||
currentlyTimedSegment = {
|
||||
if (!isSegmentCreationInProgress()) {
|
||||
sponsorTimesSubmitting.push({
|
||||
segment: [getRealCurrentTime()],
|
||||
UUID: null,
|
||||
category: Config.config.defaultCategory,
|
||||
};
|
||||
});
|
||||
} else {
|
||||
// Finish creating the new segment
|
||||
const existingTime = currentlyTimedSegment.segment[0];
|
||||
const existingSegment = getIncompleteSegment();
|
||||
const existingTime = existingSegment.segment[0];
|
||||
const currentTime = getRealCurrentTime();
|
||||
|
||||
// Swap timestamps if the user put the segment end before the start
|
||||
existingSegment.segment = [Math.min(existingTime, currentTime), Math.max(existingTime, currentTime)];
|
||||
}
|
||||
|
||||
sponsorTimesSubmitting.push({
|
||||
...currentlyTimedSegment,
|
||||
// Swap timestamps if the user put the segment end before the start
|
||||
segment: [Math.min(existingTime, currentTime), Math.max(existingTime, currentTime)],
|
||||
});
|
||||
// Save the newly created segment
|
||||
Config.config.segmentTimes.set(sponsorVideoID, sponsorTimesSubmitting);
|
||||
|
||||
currentlyTimedSegment = null;
|
||||
updateEditButtonsOnPlayer();
|
||||
updateSponsorTimesSubmitting(false);
|
||||
}
|
||||
|
||||
// Save the newly created segment
|
||||
function getIncompleteSegment(): SponsorTime {
|
||||
return sponsorTimesSubmitting[sponsorTimesSubmitting.length - 1];
|
||||
}
|
||||
|
||||
/** Is the latest submitting segment incomplete */
|
||||
function isSegmentCreationInProgress(): boolean {
|
||||
const segment = getIncompleteSegment();
|
||||
return segment && segment?.segment?.length !== 2;
|
||||
}
|
||||
|
||||
function cancelCreatingSegment() {
|
||||
if (isSegmentCreationInProgress()) {
|
||||
sponsorTimesSubmitting.splice(sponsorTimesSubmitting.length - 1, 1);
|
||||
Config.config.segmentTimes.set(sponsorVideoID, sponsorTimesSubmitting);
|
||||
}
|
||||
|
||||
updateEditButtonsOnPlayer();
|
||||
|
||||
updateSponsorTimesSubmitting(false);
|
||||
}
|
||||
|
||||
function cancelCreatingSegment() {
|
||||
currentlyTimedSegment = null;
|
||||
|
||||
updateEditButtonsOnPlayer();
|
||||
}
|
||||
|
||||
function updateSponsorTimesSubmitting(getFromConfig = true) {
|
||||
const segmentTimes = Config.config.segmentTimes.get(sponsorVideoID);
|
||||
|
||||
@@ -1447,7 +1451,7 @@ function submitSponsorTimes() {
|
||||
//called after all the checks have been made that it's okay to do so
|
||||
async function sendSubmitMessage() {
|
||||
// Add loading animation
|
||||
playerButtons.submit.image.src = chrome.extension.getURL("icons/PlayerUploadIconSponsorBlocker256px.png");
|
||||
playerButtons.submit.image.src = chrome.extension.getURL("icons/PlayerUploadIconSponsorBlocker.svg");
|
||||
playerButtons.submit.button.style.animation = "rotate 1s 0s infinite";
|
||||
|
||||
//check if a sponsor exceeds the duration of the video
|
||||
@@ -1500,7 +1504,6 @@ async function sendSubmitMessage() {
|
||||
Config.config.segmentTimes.delete(sponsorVideoID);
|
||||
|
||||
// Add submissions to current sponsors list
|
||||
// FIXME: segments from sponsorTimesSubmitting do not contain UUIDs .-.
|
||||
sponsorTimes = (sponsorTimes || []).concat(sponsorTimesSubmitting);
|
||||
|
||||
// Increase contribution count
|
||||
@@ -1511,14 +1514,13 @@ async function sendSubmitMessage() {
|
||||
Config.config.submissionCountSinceCategories = Config.config.submissionCountSinceCategories + 1;
|
||||
|
||||
// Empty the submitting times
|
||||
currentlyTimedSegment = null;
|
||||
sponsorTimesSubmitting = [];
|
||||
|
||||
updatePreviewBar();
|
||||
} else {
|
||||
// Show that the upload failed
|
||||
playerButtons.submit.button.style.animation = "unset";
|
||||
playerButtons.submit.image.src = chrome.extension.getURL("icons/PlayerUploadFailedIconSponsorBlocker256px.png");
|
||||
playerButtons.submit.image.src = chrome.extension.getURL("icons/PlayerUploadFailedIconSponsorBlocker.svg");
|
||||
|
||||
alert(utils.getErrorMessage(response.status, response.responseText));
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ export enum SponsorHideType {
|
||||
}
|
||||
|
||||
export interface SponsorTime {
|
||||
segment: number[];
|
||||
segment: [number] | [number, number];
|
||||
UUID: string;
|
||||
|
||||
category: string;
|
||||
@@ -60,10 +60,6 @@ export interface SponsorTime {
|
||||
hidden?: SponsorHideType;
|
||||
}
|
||||
|
||||
export type IncompleteSponsorTime = Omit<SponsorTime, 'segment'> & {
|
||||
segment: [number];
|
||||
};
|
||||
|
||||
export interface PreviewBarOption {
|
||||
color: string,
|
||||
opacity: string
|
||||
|
||||