Duclv

Fox News IptvSubs

Jan 14th, 2018 (edited)
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Fox News IptvSubs
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       You
  7. // @match        http://online.iptvsubs.is/
  8. // @grant        none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12.     'use strict';
  13.     (function() {
  14.         var origOpen = XMLHttpRequest.prototype.open;
  15.         XMLHttpRequest.prototype.open = function() {
  16.             this.addEventListener('load', function() {
  17.                 if(this.responseURL.indexOf('.m3u8')>1) {
  18.                     console.log(this.responseURL);
  19.                     document.querySelector('input#urlm3u8').value=this.responseURL;
  20.                     jwplayer("player-wrapper").stop();
  21.                 }
  22.             });
  23.             origOpen.apply(this, arguments);
  24.         };
  25.     })();
  26.     window.onload=function(){
  27.         var div = document.createElement('div');
  28.     div.setAttribute('class','hiddensearch');
  29.     div.innerHTML='<span class=""><a id="copyURL" class="btn"><i class="material-icons">fingerprint</i></a></span><input id="urlm3u8">';
  30.     document.querySelector("#datatable_wrapper").insertBefore(div,document.querySelector("#datatable_wrapper").childNodes[0]);
  31.     document.querySelector("#copyURL").onclick=function(){
  32.         document.querySelector('input#urlm3u8').select();
  33.         document.execCommand('copy');
  34.     };
  35.         document.querySelector('img[src="https://s3.amazonaws.com/ok2logo/foxnews.png"]').click();
  36.     };
  37. })();
Advertisement
Add Comment
Please, Sign In to add comment