Baymack
Enviado por Miguel Mamt Marin • 7 de Octubre de 2018 • Tarea • 9.769 Palabras (40 Páginas) • 82 Visitas
// ==UserScript==
// @name Baymack
// @namespace http://tampermonkey.net/
// @version 6.0
// @description try to take over the world!
// @author LSJD
// @match https://www.baymack.com/videos*
// @match https://www.baymack.com/entry*
// @include https://www.youtube.com/embed*
// @include https://*google*
// @include http*://mitly.us*
// @include http*://adshort.im*
// @include http*://j.gs*
// @grant none
// ==/UserScript==
(function() {
if(document.location.pathname.split("/").indexOf("entry") != -1){
document.location.assign("/videos");
return;
}
if(document.location.host.toLowerCase().split(".").indexOf("google") != -1 &&
document.location.pathname.toLowerCase().split("/").indexOf("recaptcha") != -1){
return;
}
document.addEventListener("click", function(e){
if(e.target.tagName.toLowerCase() == "a"){
if(!e.target.href) return;
document.location.assign(e.target.href);
if(!e.target.href.indexOf("http")) e.preventDefault();
return false;
}
});
if(document.location.host.indexOf("j.gs") != -1){
var intervalo = setInterval(function(){
var element = document.querySelector("a[id*=skip]");
if(element){
if(element.href && element.href != "#"){
document.location.assign(element.href);
clearInterval(intervalo);
}
}
}, 100);
}
var video = null;
var title = "";
var inAction = false;
var active = false;
var frm;
var Data;
var Aa;
var W;
var count = {};
var max_count = 2;
var new_entry = false;
var isInAction = function(){
if(W !== undefined && W !== null){
if(W.closed){
return !1;
}else{
return !0;
}
}
return !1;
};
var msg = function(e, fn, cnt){
try{
if(e.data == Aa.call(Data.msgs.ra)){
SC(cnt, "true");
window.removeEventListener("message", fn);
}
}catch(err){}
};
var svrf = function(){
var interval = setInterval(function(){
if(isInAction()){
W.postMessage("r", "*");
}else{
clearInterval(interval);
}
}, 100);
};
var GCb = function(arg){
if(!Aa || !Data) return !1;
inAction = isInAction();
if(!inAction){
var k, v, msa;
for(var i=1; i < arg.length; i++){
k = arg[i][0];
v = arg[i][1];
if(!GC(Aa.call(k))){
if(count[Aa.call(v)]){
if(count[Aa.call(v)] != -1){
count[Aa.call(v)]++;
}else{
return !1;
}
}else{
count[Aa.call(v)] = 1;
}
if(count[Aa.call(v)] > max_count){
(!active && alert)(Aa.call(Data.msgs.avs));
count[Aa.call(v)] = -1;
return !1;
}
if(!active){
W = Data.ltr.w()[Aa.call(Data.ltr.n)](Aa.call(v), "Complete", "directories=no, menubar =no,status=no,toolbar=no,location=no,scrollbars=yes,fullscreen=no,height=500,width=700");
msa = function(e){return msg(e, msa, Aa.call(k));};
window.addEventListener("message", msa);
inAction = !0;
return !1;
}
}
}
active = !0;
return !0;
}else{
return !1;
}
};
if(window.document.title.toLowerCase() == "baymack"){
var phpToJsDataVideos = {};
phpToJsDataVideos.videosData = JSON.parse(document.body.innerHTML.match(/"videosData"[\s]*:[\s]*(.+)?,/)[1]);
phpToJsDataVideos.baseUrl = JSON.parse(document.body.innerHTML.match(/"baseUrl"[\s]*:[\s]*(.+)?,/)[1]);
phpToJsDataVideos.needToBeLocked = JSON.parse(document.body.innerHTML.match(/"needToBeLocked"[\s]*:[\s]*(.+)?,?/)[1]);
Data = {
aut: [76, -2, 9, -15],
nmph: [43, 10, 3, -24, 20, -3, 5, -9, 10, 1, -6, 3, 3, -8, 7],
lnks: [
[
[104, 12, 0, -4, 3, -57, -11, 0, 72, 0, 0, -73, 56, -5, 2, 2, -3, 13, 0, -4, -61, 53, 12, -2, -62, 61, -11, 17, 0, 7, -6, 2, -7, -60],
[104, 12, 0, -4, 3, -57, -11, 0, 72, 0, 0, -73, 56, -5, 2, 2, -3, 13, 0, -4, -61, 53, 12, -2, -62, 67, 1, -1, -15, -53, 66, -8, 8, -65, 74, -13, -61, 67, -67, 25, -21, 59, -3, 9, -37, 18, -42, 35, -13, 26, -57, 59, -6, 12]
]
],
bcks:[/*
[105, -3, 12, -17, 12, -8],
[
[98, 10, 3, -12, 8, -58],
[104, 12, 0, -4, -54, -11, 0, 62, -4, 11, -8, 13, -75, 71, -2, -68, 41, -31, 50, -32, 40, -65, 59, -20],
],
[
[98, 10, 3, -12, 8, -57],
[104, 12, 0, -4, -54, -11, 0, 59, -60, 57,
...