altadefinizione

altadefinizione fake intro skip

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name altadefinizione
// @namespace Violentmonkey Scripts
// @include *
// @run-at document-start
// @grant none
// @description altadefinizione fake intro skip
// @version 0.0.1.20190425194134
// ==/UserScript==




function zIndex_filter(node){
    var childs = node.getElementsByTagName("*");

    for (var c=0; c<childs.length; c++){

        var css = getComputedStyle(childs[c]);
        if (childs[c].style.zIndex>1000 || css.zIndex>1000){
            childs[c].remove();
            c--;
        }
    }

}



window.onContextMenu = function(){
  return true;
}



var url = window.location.href;

if (url.indexOf("https://hdpass.")>=0){

  fhd = (url.indexOf("res")>=0);

  window.onload=function(){
    document.getElementsByClassName("wrapBgOpenload")[0].remove();

    //set max resolution
    var res = document.getElementById("listRes").getElementsByTagName("a");
    var nr = res.length;
    if (!fhd) window.location.href = res[nr-1].href;

  }

}



if (url.indexOf("oload")>=0){
  window.onload=function(){
    


    setTimeout(function(){
      
      zIndex_filter(document.body);

      document.getElementsByClassName("videocontainer")[0].getElementsByTagName("span")[0].click();
      //document.getElementsByClassName("vjs-poster vjs-hidden")[0].click();
      
      //not working because firefox has blocked video autoplay
      document.getElementsByClassName("vjs-control-text")[0].click();
      
      
      

    },1000);

  }
}