-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanilinkz_venlarger.js
98 lines (88 loc) · 6.71 KB
/
anilinkz_venlarger.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/**
The MIT License (MIT)
Copyright © 2015 Martin Pitak
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**/
// ==UserScript==
// @name anilinkz video enlarger
// @namespace https://github.com/EnyMan/anilinkz-video-enlarger
// @version 0.2.5
// @description Adds buttom to vide pages that lets you anlarge the videos for better viewing pleasure. By default it enlarges the video 1.5 times = the video is 125% bigger (thus better right?).
// @author Martin Pitak (EnyMan)
// @include /http:\/\/anilinkz\.tv\/.*(episode|special).*/
// @updateURL https://raw.githubusercontent.com/EnyMan/anilinkz-video-enlarger/master/anilinkz_venlarger.js
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
// ==/UserScript==
var dheight = 445;
var dwidth = 712;
var bheight = Math.floor(dheight * 1.5);
var bwidth = Math.floor(dwidth * 1.5);
var osrc = "";
$(function() {
$("<div> </div>").appendTo("body").attr("style","position: fixed; top: 25%; height: 50px; width: 50px;background-image: url(https://cdn2.iconfinder.com/data/icons/windows-8-metro-style/512/expand.png);background-size: 100% 100%;background-color: red;border: black 2px solid;-webkit-border-radius: 8px;z-index: 84;").attr("class","mous-button");
$(".mous-button").click(function(){
if ( $('#player').css("position") != 'absolute' ) {
$('#lightsout').fadeIn('slow');
$('iframe').filter(function(i, e) {return /arkvid.tv/.test(e.src);}).attr("height", bheight).attr("width", bwidth);
$('iframe').filter(function(i, e) {return /auengine.com/.test(e.src);}).attr("height", bheight).attr("width", bwidth);
$('iframe').filter(function(i, e) {return /www.mp4upload.com/.test(e.src);}).attr("height", bheight).attr("width", bwidth);
$('iframe').filter(function(i, e) {return /www.videonest.net/.test(e.src);}).attr("height", bheight).attr("width", bwidth);
// flash player start
osrc = $('iframe').filter(function(i, e) {return /videous.tv/.test(e.src);}).attr("src");
if(osrc){
var src = osrc;
var src = src.replace(dheight,bheight);
var src = src.replace(dwidth,bwidth);
};
$('iframe').filter(function(i, e) {return /videous.tv/.test(e.src);}).attr("src",src).attr("height", bheight).attr("width", bwidth);
//flash player end
$('#player').attr("style", 'position: absolute');
$('#player').css('left',$('#wrapper').width()/2 - $('#player').width()/2);
$('#chatango').empty(); $('.kwarta').empty();
var playerheight = $("#player").height();
var winheight = $(window).height();
var playeroffset = $("#player").offset().top;
var watchscroll = playeroffset - ((winheight - playerheight) / 2);
$('#lightsout').fadeIn('slow');
$('html,body').stop().animate({ scrollTop: watchscroll }, "slow");
$(".mous-button").attr("style", "position: fixed; top: 25%; height: 50px; width: 50px;background-image: url(https://cdn2.iconfinder.com/data/icons/windows-8-metro-style/512/collapse.png);background-size: 100% 100%;background-color: red;border: black 2px solid;-webkit-border-radius: 8px;z-index: 84;").attr("class","mous-button");
$("#lightsout").click(function(){
$('#lightsout').fadeOut('slow');
$('iframe').filter(function(i, e) {return /arkvid.tv/.test(e.src);}).attr("height", dheight).attr("width", dwidth);
$('iframe').filter(function(i, e) {return /auengine.com/.test(e.src);}).attr("height", dheight).attr("width", dwidth);
$('iframe').filter(function(i, e) {return /www.mp4upload.com/.test(e.src);}).attr("height", dheight).attr("width", dwidth);
$('iframe').filter(function(i, e) {return /www.videonest.net/.test(e.src);}).attr("height", dheight).attr("width", dwidth);
//flash player start
$('iframe').filter(function(i, e) {return /videous.tv/.test(e.src);}).attr("src",osrc).attr("height", dheight).attr("width", dwidth);
//flash player end
$('#player').attr("style", '');
$(".mous-button").attr("style", "position: fixed; top: 25%; height: 50px; width: 50px;background-image: url(https://cdn2.iconfinder.com/data/icons/windows-8-metro-style/512/expand.png);background-size: 100% 100%;background-color: red;border: black 2px solid;-webkit-border-radius: 8px;z-index: 84;").attr("class","mous-button");
});
} else {
$('#lightsout').fadeOut('slow');
$('iframe').filter(function(i, e) {return /arkvid.tv/.test(e.src);}).attr("height", dheight).attr("width", dwidth);
$('iframe').filter(function(i, e) {return /auengine.com/.test(e.src);}).attr("height", dheight).attr("width", dwidth);
$('iframe').filter(function(i, e) {return /www.mp4upload.com/.test(e.src);}).attr("height", dheight).attr("width", dwidth);
$('iframe').filter(function(i, e) {return /www.videonest.net/.test(e.src);}).attr("height", dheight).attr("width", dwidth);
// flash player start
$('iframe').filter(function(i, e) {return /videous.tv/.test(e.src);}).attr("src",osrc).attr("height", dheight).attr("width", dwidth);
// flash player end
$('#player').attr("style", '');
$(".mous-button").attr("style", "position: fixed; top: 25%; height: 50px; width: 50px;background-image: url(https://cdn2.iconfinder.com/data/icons/windows-8-metro-style/512/expand.png);background-size: 100% 100%;background-color: red;border: black 2px solid;-webkit-border-radius: 8px;z-index: 84;").attr("class","mous-button");
}
});
});