Skip to content

Instantly share code, notes, and snippets.

View eperedo's full-sized avatar
🎲
remote only

Eduardo Peredo Rivero eperedo

🎲
remote only
View GitHub Profile
@eperedo
eperedo / tutorial_pagination.js
Last active April 16, 2021 22:25
platzi tutorials pagination
// Open the developer tools in chrome/edge and run this code in any course page
// If the course only has 10 or less tutorials you are NOT going to see any change.
// Courses with more than 10 tutorials to test this script: https://platzi.com/clases/git-github/
// You will see the pagination at the bottom of the tutorials section
const tutorials = window.initialData?.initialState?.tutorials;
const courseId = window.initialData?.initialState?.course?.id;
const userId = window.contactInfo?.userId;
const avatarDom = document.querySelector('.Actionsv2-avatar');
let avatarUrl = '';