Commit 2292c7f4 authored by Ahoy's avatar Ahoy

Addet change bg, https allserials

parent 68a734e2
Pipeline #10973383 passed with stages
in 39 seconds
......@@ -182,6 +182,15 @@
<span class="attr-name">data-player=&quot;</span><span class="attr-value">moonwalk,hdgo,iframe</span><span class="attr-name">&quot;</span>
<span class="comment"> - можно указывать несколько источников, через запятую</span>
</div>
<div class="code">
<span class="comment">
Параметр <span class="attr-name">data-bg</span>
</span>
<br>
<span class="attr-name">data-bg=&quot;</span><span class="attr-value">#2A3440</span><span class="attr-name">
&quot;</span>
<span class="comment"> - цвет фона загрузки</span>
</div>
<div class="code">
<span class="comment">
Использование собственных токенов
......
......@@ -21,16 +21,19 @@ function yo() {
return /^data-/.test(a.name) && (o[a.name.substr(5)] = a.value), o;
}, {});
if (options.title.indexOf('трейлер')+1) {
if (options.title.indexOf('трейлер')+1 || t) {
options.player = 'trailer';
}
else if (t) {
options.player = 'torrent';
}
options.player = (options.player)
? options.player
: 'moonwalk,hdgo,iframe,kodik,allserials,trailer,torrent';
options.player = (options.title.indexOf('трейлер')+1 || t)
? 'trailer'
: (!options.player)
? 'moonwalk,hdgo,kodik,iframe,allserials,trailer,torrent'
: options.player;
options.bg = (!options.bg)
? '#2A3440'
: options.bg;
for (var data in options) {
if (options.hasOwnProperty(data) && options[data]) {
......@@ -47,13 +50,8 @@ function yo() {
return false;
}
if (window.top.location.protocol == 'https:') {
options.player = options.player
.replace('allserials', '')
}
var head = document.head || document.getElementsByTagName('head')[0];
var css = '#yohoho{border:0;margin:0;padding:0;overflow:hidden;position:relative}#yohoho-loading{z-index:9999;position:absolute;left:0;top:0;width:100%;height:100%;background:#2A3440 url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiIGNsY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4zLTI1LjVjMC0xNi42LTEyLjgtMzAtMjguNi0zMCAtMTUuOCAwLTI4LjYgMTMuNS0yOC42IDMwIDAgOS4yIDMuNCAxNy45IDkuNiAyNC40IDYuMiA2LjUgMTQuNSAxMC4xIDIzLjIgMTAuMXMxNy0zLjYgMjMuMi0xMC4xYzYuMi02LjUgOS42LTE1LjIgOS42LTI0LjQgMC0xMC40LTMuOS0yMC4yLTEwLjktMjcuNiAtNy03LjQtMTYuMy0xMS40LTI2LjMtMTEuNHMtMTkuMyA0LjEtMjYuMyAxMS40UzEzIDQxLjggMTMgNTIuMmMwIDAuOS0wLjcgMS42LTEuNSAxLjZTMTAgNTMuMSAxMCA1Mi4yYzAtMTEuMyA0LjItMjEuOSAxMS44LTI5LjkgNy42LTggMTcuNy0xMi40IDI4LjQtMTIuNCAxMC43IDAgMjAuOCA0LjQgMjguNCAxMi40IDcuNiA4IDExLjggMTguNiAxMS44IDI5LjkgMCAxMC4xLTMuNyAxOS41LTEwLjUgMjYuN0M3My4xIDg2IDY0LjEgODkuOSA1NC41IDg5Ljl6IiBmaWxsPSIjZmZmIj48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InJvdGF0ZSIgZnJvbT0iMCA1MCA1MCIgdG89IjM2MCA1MCA1MCIgZHVyPSIxcyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz48L3BhdGg+PC9zdmc+) 50% 50% no-repeat}#yohoho-buttons{position:absolute;z-index:9999;right:0;top:50px;text-align:left}#yohoho-buttons:hover{right:0!important}#yohoho-buttons div{font-family:Verdana,sans-serif;font-weight:normal;text-shadow:none;line-height:normal;font-size:12px;color:#fff;background:#2A3440;border-radius:5px 0 0 5px;padding:5px;margin:5px 0 5px 5px;opacity:.7;}#yohoho-buttons div:hover,#yohoho-buttons div.yohoho-active{color:#fff;background:#2F3A46;cursor:pointer;opacity:1}';
var css = '#yohoho{border:0;margin:0;padding:0;overflow:hidden;position:relative}#yohoho-loading{z-index:9999;position:absolute;left:0;top:0;width:100%;height:100%;background:' + options.bg + ' url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiIGNsYXNzPSJ1aWwtc3BpcmFsIj48cmVjdCB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgY2xhc3M9ImJrIiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTU0LjUgODkuOWMtOS42IDAtMTguNi0zLjktMjUuNC0xMSAtNi44LTcuMS0xMC41LTE2LjYtMTAuNS0yNi43IDAtOC45IDMuMy0xNy4yIDkuMi0yMy41UzQxLjcgMTkgNTAuMiAxOWM4LjQgMCAxNi40IDMuNCAyMi4zIDkuNyA2IDYuMyA5LjIgMTQuNiA5LjIgMjMuNSAwIDE1LjgtMTIuMiAyOC43LTI3LjMgMjguNyAtMTUgMC0yNy4zLTEyLjktMjcuMy0yOC43IDAtMTMuMyAxMC4zLTI0LjIgMjMtMjQuMnMyMyAxMC44IDIzIDI0LjJjMCAxMC44LTguNCAxOS42LTE4LjcgMTkuNiAtMTAuMyAwLTE4LjctOC44LTE4LjctMTkuNiAwLTguMyA2LjUtMTUuMSAxNC40LTE1LjEgNy45IDAgMTQuNCA2LjggMTQuNCAxNS4xIDAgNS44LTQuNSAxMC42LTEwLjEgMTAuNnMtMTAuMS00LjgtMTAuMS0xMC42YzAtMy40IDIuNi02LjEgNS44LTYuMSAzLjIgMCA1LjggMi43IDUuOCA2LjEgMCAwLjktMC43IDEuNi0xLjUgMS42IC0wLjggMC0xLjUtMC43LTEuNS0xLjYgMC0xLjYtMS4zLTIuOS0yLjgtMi45IC0xLjUgMC0yLjggMS4zLTIuOCAyLjkgMCA0LjEgMy4yIDcuN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:9999;right:0;top:50px;text-align:left}#yohoho-buttons:hover{right:0!important}#yohoho-buttons div{font-family:Verdana,sans-serif;font-weight:normal;text-shadow:none;line-height:normal;font-size:12px;color:#fff;background:#2A3440;border-radius:5px 0 0 5px;padding:5px;margin:5px 0 5px 5px;opacity:.7;}#yohoho-buttons div:hover,#yohoho-buttons div.yohoho-active{color:#fff;background:#2F3A46;cursor:pointer;opacity:1}';
s = document.createElement('style');
s.type = 'text/css';
if (s.styleSheet) {
......@@ -115,11 +113,11 @@ function yo() {
var option = document.createElement('div');
option.setAttribute('onclick', 'showPlayer("' + players[key] + '", this)');
option.dataset.iframe = players[key];
if (key == 'trailer') {
if (key === 'trailer') {
j++;
option.innerText = j + '► ТРЕЙЛЕР';
}
else if (key == 'torrent') {
else if (key === 'torrent') {
j++;
option.innerText = j + '► СКАЧАТЬ';
}
......@@ -183,7 +181,7 @@ function showPlayer(iframe, element, buttons) {
function httpGetAsync(url, body, callback) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
if (xmlHttp.readyState === 4 && xmlHttp.status === 200) {
callback(tryParseJSON(xmlHttp.responseText));
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment