Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <script type="text/javascript">
  2. window.onload = () => {
  3. const getCards = () => {
  4. return new Promise((resolve) => {
  5. const cards = Array.prototype.slice.call(document.querySelectorAll(".tribe-events-month-event-title"))
  6. resolve(cards)
  7. })
  8. }
  9.  
  10. getCards().then((cards) => {
  11. cards.forEach((card, index) => {
  12. let box = card.parentElement
  13. let url = card.querySelector("a.url").href
  14. box.style.cursor = "pointer"
  15. box.onclick = () => window.open(url, "_blank")
  16. })
  17. })
  18. }
  19. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement