Skip to content

Commit

Permalink
fix: append to dom (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolson committed Feb 11, 2022
1 parent d7593bc commit a6de26a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ function mainWrapper() {
SAPISID: CookieGet('SAPISID') as string,
ORIGIN_URL: new URL(document.URL).origin,
}
/* eslint-enable no-underscore-dangle */
appendAppToDom(config, playlistName, XPATH.APP_RENDER_ROOT)

document.addEventListener('yt-action', (event: any) => {
if (event.detail.actionName === 'ytd-update-grid-state-action') {
appendAppToDom(config, playlistName, XPATH.APP_RENDER_ROOT)
}
})
}

// Called every time app navigation occurs
Expand Down

0 comments on commit a6de26a

Please sign in to comment.