Skip to content

Commit

Permalink
Release v2.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
drunkwinter authored and github-actions[bot] committed Jun 29, 2023
1 parent 8526001 commit 94dfd68
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
23 changes: 21 additions & 2 deletions dist/Simple-YouTube-Age-Restriction-Bypass.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// @description:fr Regardez des vidéos YouTube avec des restrictions d'âge sans vous inscrire et sans confirmer votre âge 😎
// @description:it Guarda i video con restrizioni di età su YouTube senza login e senza verifica dell'età 😎
// @icon https://github.com/zerodytrash/Simple-YouTube-Age-Restriction-Bypass/raw/v2.5.4/src/extension/icon/icon_64.png
// @version 2.5.6
// @version 2.5.7
// @author Zerody (https://github.com/zerodytrash)
// @namespace https://github.com/zerodytrash/Simple-YouTube-Age-Restriction-Bypass/
// @supportURL https://github.com/zerodytrash/Simple-YouTube-Age-Restriction-Bypass/issues
Expand Down Expand Up @@ -1043,13 +1043,32 @@
error(err, `Player Unlock Method ${index + 1} failed with exception`);
}

return !Config.VALID_PLAYABILITY_STATUSES.includes(
const isStatusValid = Config.VALID_PLAYABILITY_STATUSES.includes(
(_unlockedPlayerRespon6 = unlockedPlayerResponse) === null || _unlockedPlayerRespon6 === void 0
? void 0
: (_unlockedPlayerRespon7 = _unlockedPlayerRespon6.playabilityStatus) === null || _unlockedPlayerRespon7 === void 0
? void 0
: _unlockedPlayerRespon7.status,
);

/**
* Workaround: https://github.com/zerodytrash/Simple-YouTube-Age-Restriction-Bypass/issues/191
*
* YouTube checks if the `trackingParams` in the response matches the decoded `trackingParam` in `responseContext.mainAppWebResponseContext`.
* However, the `TV Embedded Player` does not include the `trackingParam` in the `responseContext`, causing the check to fail.
*
* This workaround addresses the issue by hardcoding the `trackingParams` in the `TV Embedded Player` context.
*/
if (isStatusValid && strategy.name === 'TV Embedded Player') {
unlockedPlayerResponse.trackingParams = 'CAAQu2kiEwjor8uHyOL_AhWOvd4KHavXCKw=';
unlockedPlayerResponse.responseContext = {
mainAppWebResponseContext: {
trackingParam: 'kx_fmPxhoPZRzgL8kzOwANUdQh8ZwHTREkw2UqmBAwpBYrzRgkuMsNLBwOcCE59TDtslLKPQ-SS',
},
};
}

return !isStatusValid;
});

// Cache response to prevent a flood of requests in case youtube processes a blocked response mutiple times.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"type": "module",
"name": "simple-youtube-age-restriction-bypass",
"description": "A simple userscript to bypass YouTube's age verification and watch age restricted videos without having to sign in.",
"version": "2.5.6",
"version": "2.5.7",
"repository": {
"type": "git",
"url": "git+https://github.com/zerodytrash/Simple-YouTube-Age-Restriction-Bypass.git"
Expand Down

0 comments on commit 94dfd68

Please sign in to comment.