-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa99901
commit e41a6b1
Showing
1,018 changed files
with
242,528 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
16,047 changes: 16,047 additions & 0 deletions
16,047
Sources/ContentScopeScripts/dist/contentScopeIsolated.js
Large diffs are not rendered by default.
Oops, something went wrong.
4,538 changes: 4,538 additions & 0 deletions
4,538
Sources/ContentScopeScripts/dist/pages/duckplayer/index.html
Large diffs are not rendered by default.
Oops, something went wrong.
950 changes: 950 additions & 0 deletions
950
Sources/ContentScopeScripts/dist/pages/duckplayer/js/index.css
Large diffs are not rendered by default.
Oops, something went wrong.
3,554 changes: 3,554 additions & 0 deletions
3,554
Sources/ContentScopeScripts/dist/pages/duckplayer/js/index.js
Large diffs are not rendered by default.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
Sources/ContentScopeScripts/dist/pages/duckplayer/js/inline.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use strict"; | ||
(() => { | ||
// pages/duckplayer/src/js/inline.js | ||
var param = new URLSearchParams(window.location.search).get("platform"); | ||
if (isAllowed(param)) { | ||
document.documentElement.dataset.platform = String(param); | ||
} else { | ||
document.documentElement.dataset.platform = "apple"; | ||
} | ||
function isAllowed(input) { | ||
const allowed = ["windows", "apple", "integration"]; | ||
return allowed.includes(input); | ||
} | ||
})(); |
Binary file added
BIN
+7.52 KB
Sources/ContentScopeScripts/dist/pages/duckplayer/js/mobile-bg-GCRU67TC.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.58 KB
Sources/ContentScopeScripts/dist/pages/duckplayer/js/player-bg-F7QLKTXS.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions
32
Sources/ContentScopeScripts/dist/pages/duckplayer/js/storage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
function deleteStorage(subject) { | ||
Object.keys(subject).forEach((key) => { | ||
if (key.indexOf('yt-player') === 0) { | ||
return; | ||
} | ||
subject.removeItem(key); | ||
}); | ||
} | ||
|
||
function deleteAllCookies() { | ||
const cookies = document.cookie.split(';'); | ||
for (let i = 0; i < cookies.length; i++) { | ||
const cookie = cookies[i]; | ||
const eqPos = cookie.indexOf('='); | ||
const name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie; | ||
document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT;domain=youtube-nocookie.com;path=/;'; | ||
} | ||
} | ||
|
||
export function initStorage() { | ||
window.addEventListener('unload', () => { | ||
deleteStorage(localStorage); | ||
deleteStorage(sessionStorage); | ||
deleteAllCookies(); | ||
}); | ||
|
||
window.addEventListener('load', () => { | ||
deleteStorage(localStorage); | ||
deleteStorage(sessionStorage); | ||
deleteAllCookies(); | ||
}); | ||
} |
40 changes: 40 additions & 0 deletions
40
Sources/ContentScopeScripts/dist/pages/duckplayer/js/utils.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { VideoParams } from 'injected/src/features/duckplayer/util.js'; | ||
|
||
/** | ||
* @param {string} href | ||
* @param {string} urlBase | ||
* @return {null | string} | ||
*/ | ||
export function createYoutubeURLForError(href, urlBase) { | ||
const valid = VideoParams.forWatchPage(href); | ||
if (!valid) return null; | ||
|
||
// this will not throw, since it was guarded above | ||
const original = new URL(href); | ||
|
||
// for now, we're only intercepting clicks when `emb_err_woyt` is present | ||
// this may not be enough to cover all situations, but it solves our immediate | ||
// problems whilst keeping the blast radius low | ||
if (original.searchParams.get('feature') !== 'emb_err_woyt') return null; | ||
|
||
// if we get this far, we think a click is occurring that would cause a navigation loop | ||
// construct the 'next' url | ||
const url = new URL(urlBase); | ||
url.searchParams.set('v', valid.id); | ||
|
||
if (typeof valid.time === 'string') { | ||
url.searchParams.set('t', valid.time); | ||
} | ||
|
||
return url.toString(); | ||
} | ||
|
||
/** | ||
* @param {string|null|undefined} iframeTitle | ||
* @return {string | null} | ||
*/ | ||
export function getValidVideoTitle(iframeTitle) { | ||
if (typeof iframeTitle !== 'string') return null; | ||
if (iframeTitle === 'YouTube') return null; | ||
return iframeTitle.replace(/ - YouTube$/g, ''); | ||
} |
38 changes: 38 additions & 0 deletions
38
Sources/ContentScopeScripts/dist/pages/duckplayer/locales/bg/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "Видеоклиповете в YouTube винаги да се отварят тук", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Duck Player да остане включен", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Отваряне на информацията", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Отваряне на настройки", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Гледане в YouTube", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>ГРЕШКА:</b> невалиден идентификатор на видеоклипа", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Duck Player осигурява чисто изживяване без персонализирани реклами в YouTube и предотвратява влиянието на вече гледаните видеоклипове върху препоръките на YouTube." | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
Sources/ContentScopeScripts/dist/pages/duckplayer/locales/cs/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "Vždy otevírat videa YouTube tady", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Nechat zapnutý přehrávač Duck Player", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Otevřít informace", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Otevřené nastavení", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Sledovat na YouTube", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>CHYBA:</b> Neplatné ID videa", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Přehrávač Duck Player nabízí sledování v minimalistickém prostředí bez personalizovaných reklam a brání tomu, aby sledovaná videa ovlivňovala tvoje doporučení na YouTube." | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
Sources/ContentScopeScripts/dist/pages/duckplayer/locales/da/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "Åbn altid YouTube-videoer her", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Hold Duck Player slået til", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Åbn info", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Åbn Indstillinger", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Se på YouTube", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>FEJL:</b> Ugyldigt video-ID", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Duck Player giver en ren seeroplevelse uden målrettede annoncer og forhindrer, at visningsaktivitet påvirker dine YouTube-anbefalinger." | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
Sources/ContentScopeScripts/dist/pages/duckplayer/locales/de/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "YouTube-Videos immer hier öffnen", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Duck Player aktiviert lassen", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Info öffnen", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Einstellungen öffnen", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Auf YouTube ansehen", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>FEHLER:</b> Ungültige Video-ID", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Mit Duck Player kannst du dir ungestört und ohne personalisierte Werbung Inhalte ansehen. Er verhindert, dass das, was du dir ansiehst, deine YouTube-Empfehlungen beeinflussen." | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
Sources/ContentScopeScripts/dist/pages/duckplayer/locales/el/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "Ανοίγετε πάντα τα βίντεο του YouTube εδώ", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Διατηρήστε το Duck Player ενεργοποιημένο", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Ανοίξτε για πληροφορίες", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Άνοιγμα ρυθμίσεων", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Παρακολούθηση στο YouTube", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>ΣΦΑΛΜΑ:</b> Μη έγκυρο αναγνωριστικό βίντεο", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Το Duck Player παρέχει μια καθαρή εμπειρία προβολής χωρίς εξατομικευμένες διαφημίσεις, ενώ εμποδίζει τη δραστηριότητα προβολής να επηρεάσει τις συστάσεις που θα λαμβάνετε στο YouTube." | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
Sources/ContentScopeScripts/dist/pages/duckplayer/locales/en/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"smartling": { | ||
"string_format": "icu", | ||
"translate_paths": [ | ||
{ | ||
"path": "*/title", | ||
"key": "{*}/title", | ||
"instruction": "*/note" | ||
} | ||
] | ||
}, | ||
"alwaysWatchHere": { | ||
"title": "Always open YouTube videos here", | ||
"note": "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled": { | ||
"title": "Keep Duck Player turned on", | ||
"note": "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton": { | ||
"title": "Open Info", | ||
"note": "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton": { | ||
"title": "Open Settings", | ||
"note": "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube": { | ||
"title": "Watch on YouTube", | ||
"note": "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError": { | ||
"title": "<b>ERROR:</b> Invalid video id", | ||
"note": "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo": { | ||
"title": "Duck Player provides a clean viewing experience without personalized ads and prevents viewing activity from influencing your YouTube recommendations." | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
Sources/ContentScopeScripts/dist/pages/duckplayer/locales/es/duckplayer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"smartling" : { | ||
"string_format" : "icu", | ||
"translate_paths" : [ | ||
{ | ||
"path" : "*/title", | ||
"key" : "{*}/title", | ||
"instruction" : "*/note" | ||
}] | ||
}, | ||
"alwaysWatchHere" : { | ||
"title" : "Abrir siempre los vídeos de YouTube aquí", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"keepEnabled" : { | ||
"title" : "Mantener Duck Player activado", | ||
"note" : "label text for a checkbox that enables this feature for all videos, not just the current one" | ||
}, | ||
"openInfoButton" : { | ||
"title" : "Abrir información", | ||
"note" : "aria label text on a button, to indicate there's more information to be shown if clicked" | ||
}, | ||
"openSettingsButton" : { | ||
"title" : "Abrir ajustes", | ||
"note" : "aria label text on a button, opens a screen where the user can change settings" | ||
}, | ||
"watchOnYoutube" : { | ||
"title" : "Ver en YouTube", | ||
"note" : "text on a link that takes the user from the current page back onto YouTube.com" | ||
}, | ||
"invalidIdError" : { | ||
"title" : "<b>ERROR:</b> ID de vídeo no válida", | ||
"note" : "Shown when the page URL doesn't match a known video ID. Note for translators: The <b> tag makes the word 'ERROR:' bold. Depending on the grammar of the target language, you might need to move it so that the correct word is emphasized." | ||
}, | ||
"tooltipInfo" : { | ||
"title" : "Duck Player ofrece una experiencia de visualización limpia sin anuncios personalizados e impide que la actividad de visualización influya en tus recomendaciones de YouTube." | ||
} | ||
} |
Oops, something went wrong.