Facebook
From Dura, 1 Month ago, written in JavaScript.
Embed
Download Paste or View Raw
Hits: 145
  1. `setInterval(() => {
  2.     document.querySelectorAll("[free=""]").forEach(el => el.setAttribute("free", true)) // set all elements with the attribute free set to "" to true
  3.  
  4.     if (document.querySelector("if-access [slot="granted"]")) { // replace HOW TO ENROLL to YOU HAVE ACCESS
  5.         document.querySelector("if-access [slot="denied"]").remove()
  6.         document.querySelector("if-access [slot="granted"]").setAttribute("slot", "denied")
  7.     }
  8.  
  9.     if (document.querySelector("video-player")?.shadowRoot?.querySelector(".vid")?[removed]) return; // return if no video player
  10.     const vimeoId = document.querySelector("global-data").vimeo; // get id for vimeo video
  11.     const youtubeId = document.querySelector("global-data").youtube; // get id for vimeo video
  12.  
  13.     if (vimeoId) { // if there is an id,
  14.         document.querySelector("video-player").setAttribute("free", true) // set free to true
  15.         document.querySelector("video-player").shadowRoot.querySelector(".vid")[removed] = <iframe src="https://player.vimeo.com/video/${vimeoId}" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen="" title="${location.pathname.split("/")[3]}" width="426" height="240" frameborder="0"></iframe> // set video
  16.     }
  17.     if (youtubeId) { // if there is an id,
  18.         document.querySelector("video-player").setAttribute("free", true) // set free to true
  19.         document.querySelector("video-player").shadowRoot.querySelector(".vid")[removed] = <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> // set video
  20.     }
  21. }, 100)`