NADAmobile Automator

Automate watching NADA. Couple with https://chrome.google.com/webstore/detail/always-on-top/amclpcgcmdkdaichklckjepcjjdcmcii?hl=en

当前为 2016-10-05 提交的版本,查看 最新版本

// ==UserScript==
// @name           NADAmobile Automator
// @description    Automate watching NADA. Couple with https://chrome.google.com/webstore/detail/always-on-top/amclpcgcmdkdaichklckjepcjjdcmcii?hl=en
// @author         free21
// @include        http://www.nadamobile.com/watch
// @include        http://www.nadamovietrailers.com/watch/
// @include        http://www.fameapp.io/*
// @version        1.0.5
// @require     http://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js
// @namespace https://gf.qytechs.cn/users/57063
// ==/UserScript==

$(document).on('click', ".next-button a", function() {
  var form = $("<form></form>");
  form.attr({
    id: "formid",
    action: $(this).attr("href"),
    method: "GET",
  });

  $("body").append(form);
  $("#formid").submit();
  $("#formid").remove();
  return false;
});
$(document).on('click', "#randarticle_0 > h2:nth-child(1) > a", function() {
  var form = $("<form></form>");
  form.attr({
    id: "formid",
    action: $(this).attr("href"),
    method: "GET",
  });

  $("body").append(form);
  $("#formid").submit();
  $("#formid").remove();
  return false;
});
$(document).on('click', "#votenow", function() {
  var form = $("<form></form>");
  form.attr({
    id: "formid",
    action: $(this).attr("href"),
    method: "GET",
  });

  $("body").append(form);
  $("#formid").submit();
  $("#formid").remove();
  return false;
});


function getRandomArbitrary(min, max) {
  return Math.random() * (max - min) + min;
}
timeto = getRandomArbitrary(1000, 10000);
$('.player--hold video').bind('ended', function() {
  setTimeout(function() {
    $('.next-button a').click();
  }, timeto);

});
//for fameapp.io
$('#post-content video').bind('timeupdate', function() {
  if (this.currentTime > 1.5 && this.currentTime < 2) {
    console.log('time is long enough');
    this.currentTime = this.duration - 2;
  }
});
$('#post-content video').bind('canplay', function() {
  this.play();
});
$('#post-content video').bind('ended', function() {
  setTimeout(function() {
    $("#randarticle_0 > h2:nth-child(1) > a").click();
  }, timeto);
});
//for nadamovietrailers.com/watch
$('.jumbotron video').bind('canplay', function () {
  this.play();
});
$('.jumbotron video').bind('timeupdate', function() {
  if (this.currentTime > 1.5 && this.currentTime < 2) {
    console.log('time is long enough');
    this.currentTime = this.duration - 2;
  }
});
$('.jumbotron video').bind('ended', function() {
  setTimeout(function() {
    $("#votenow").click();
  }, timeto);
});

$(document).ready(function() {
  if (document.getElementsByTagName("title")[0].innerHTML == "Application Error") {
    setTimeout(function() {
      location.reload();
    }, 6000);

  }

});

    setTimeout(function() {
      location.reload();
    }, 300000);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址