Created
July 18, 2024 13:04
-
-
Save mdhruvil/b16b040c19d3f684ce2e5fa2a5ad2d39 to your computer and use it in GitHub Desktop.
Paste this script into fireship.io console to access all courses for free
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
const timeOut = 1000; | |
setInterval(() => { | |
document | |
.querySelectorAll('[free=""]') | |
.forEach((el) => el.setAttribute("free", true)); | |
if (document.querySelector('if-access [slot="granted"]')) { | |
document.querySelector('if-access [slot="denied"]').remove(); | |
document | |
.querySelector('if-access [slot="granted"]') | |
.setAttribute("slot", "denied"); | |
} | |
if ( | |
document.querySelector("video-player")?.shadowRoot?.querySelector(".vid") | |
?.innerHTML | |
) | |
return; // return if no video player | |
const vimeoId = parseInt(atob(document.querySelector("global-data").vimeo)); | |
const youtubeId = document.querySelector("global-data").youtube; | |
if (vimeoId) { | |
document.querySelector("video-player").setAttribute("free", true); | |
document | |
.querySelector("video-player") | |
.shadowRoot.querySelector( | |
".vid" | |
).innerHTML = `<iframe src="https://player.vimeo.com/video/${vimeoId}?quality=360p" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen="" title="${ | |
location.pathname.split("/")[3] | |
}" width="426" height="240" frameborder="0"></iframe>`; | |
} | |
if (youtubeId) { | |
document.querySelector("video-player").setAttribute("free", true); // set free to true | |
document | |
.querySelector("video-player") | |
.shadowRoot.querySelector( | |
".vid" | |
).innerHTML = `<iframe src="https://youtube.com/embed/${youtubeId}" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen="" title="${ | |
location.pathname.split("/")[3] | |
}" width="426" height="240" frameborder="0"></iframe>`; | |
} | |
}, timeOut); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment