-
Notifications
You must be signed in to change notification settings - Fork 0
/
somethinglikethat.js
1 lines (1 loc) · 3.93 KB
/
somethinglikethat.js
1
(()=>{var e={667:(e,t,n)=>{"use strict";function o(){var e=window.XMLHttpRequest.prototype.open;window.XMLHttpRequest.prototype.open=function(t,n,...o){this.addEventListener("readystatechange",(function(){if(4==this.readyState&&this.responseURL.includes("QueryOTTLiveTVHomeData")){const e=JSON.parse(this.responseText);for(const t of e.liveTVHomeSubjectList)if("Movies"===t.name){console.log(t);for(const e of t.channelPlaybillList)"20000081"===e.channelDetail.ID&&(window.location.replace("https://playtv.unifi.com.my/EPG/WEBTV/index.html#/channels/channels-detail/20000081/"+e.playbillLites[0].ID),$(".side-channel-list").hide(),$(".info-channel").hide(),$(".ant-layout-footer").hide(),$(".ant-layout-content").css("margin-top","0px"))}}})),e.apply(this,arguments)}}n.r(t),n.d(t,{inject_xmml:()=>o})},922:(e,t,n)=>{"use strict";function o(e){return new Promise((t=>{const n=setInterval((()=>{$(e)&&$(e).length>0&&(clearInterval(n),t(!0))}),50)}))}function s(e,t,n,o){var a,l;o||(a=$(e)),a&&a.length>0?(l=!0,a.each((function(){var e=$(this);e.data("alreadyFound")||(t(e)?l=!1:e.data("alreadyFound",!0))}))):l=!1;var c=s.controlObj||{},i=e.replace(/[^\w]/g,"_"),r=c[i];l&&n&&r?(clearInterval(r),delete c[i]):r||(r=setInterval((function(){s(e,t,n,o)}),300),c[i]=r),s.controlObj=c}function a(e,t){var n=document.createEvent("MouseEvents");n.initEvent(t,!0,!0),e[0].dispatchEvent(n)}function l(e){a($(e),"mousedown"),a($(e),"mouseup")}function c(e,t){var n=document.createEvent("MouseEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function i(e){c($(e),"mousedown"),c($(e),"mouseup")}function r(){var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()}function u(){var e=new Event("keypress");e.which=122,e.altKey=!1,e.ctrlKey=!1,e.shiftKey=!1,e.metaKey=!1,e.bubbles=!0,document.dispatchEvent(e)}function d(e){return new Promise(((t,n)=>{GM_xmlhttpRequest({method:"GET",url:e,onload:function(e){t(e.responseText)}})}))}n.r(t),n.d(t,{_clickNode:()=>i,_triggerMouseEvent:()=>c,clickNode:()=>l,get_request:()=>d,go_full_screen:()=>r,mKeyF11:()=>u,triggerMouseEvent:()=>a,waitElements:()=>o,waitForKeyElements:()=>s})}},t={};function n(o){var s=t[o];if(void 0!==s)return s.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};const{inject_xmml:o}=n(667),{_clickNode:s,clickNode:a,get_request:l}=n(922);console.log("Unifi TV 2.0"),o(),$("#root").hide(),$(".header-nav-wrapper").hide(),setTimeout((()=>{$("#root").show()}),500),setInterval((()=>{$(".player-channel").css("height","100%"),$(".shaka-controls-container").remove(),"block"==$(".side-channel-list").css("display")&&$(".side-channel-list").hide(),"block"==$(".info-channel").css("display")&&$(".info-channel").hide(),"block"==$(".ant-layout-footer").css("display")&&$(".ant-layout-footer").hide(),"block"==$(".shaka-controls-container").css("display")&&($(".shaka-controls-container").hide(),$(".shaka-controls-container").css("opacity",0)),"block"==$("button.shaka-fullscreen-button").css("display")&&"fullscreen"===$("button.shaka-fullscreen-button").html()&&a("button.shaka-fullscreen-button"),"block"==$(".padding-side-wrapper").css("display")&&$(".padding-side-wrapper").css("padding","0px"),"block"==$(".shaka-video-container").css("display")&&($(".shaka-video-container").css("cursor","none"),$(".shaka-video-container").find(".shaka-video").each(((e,t)=>{$(t).css("height","715px")}))),"block"==$(".ant-layout-content").css("display")&&$(".ant-layout-content").css("margin-top","0px"),console.log($("button.shaka-fullscreen-button").css("display"))}),300)})();