Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. document.evaluate('//*[text()="' + "Regarder la télé" + '"]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE).snapshotItem(0).click();
  2. setTimeout(function() {
  3. v = document.querySelector("video")
  4. v.style.position="absolute";
  5. v.style.zIndex="50000";
  6. v.style.top=0;
  7. v.style.bottom=0;
  8. v.style.left=0;
  9. v.style.right=0;
  10. e = document.createEvent("KeyboardEvent");
  11. Object.defineProperty(e, 'keyCode', {
  12.   get : function() {
  13.     return 84;
  14.   }
  15. });
  16. e.initKeyboardEvent('keydown', true, true, window, false, false, false, false, 84, 0);
  17. document.addEventListener("keydown",(e) => {
  18.   if(e.keyCode == 84) {
  19.     t = document.querySelector("[data-tracking-screen=remote]")
  20.     t.parentElement.parentElement.style.display="none";
  21.     setTimeout(function() {
  22.       c = t.querySelectorAll("img + img")
  23.       zap(0);
  24.     }, 500);
  25.   }
  26. })
  27. document.dispatchEvent(e)
  28. }, 500);
  29.  
  30. currentChannel = 0;
  31.  
  32. function zap(channel) {
  33.   c[channel].click();
  34. }
  35.  
  36. document.addEventListener("keydown", function(e) {
  37.   switch(e.code) {
  38.     case "KeyJ":
  39.       zap(--currentChannel);
  40.     break;
  41.     case "KeyK":
  42.       zap(++currentChannel);
  43.     break;
  44.   }
  45.  
  46. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement