Commit 31931167 authored by Ahoy's avatar Ahoy

Addet bg, text buttons

parent 85d30212
Pipeline #11555181 passed with stages
in 45 seconds
......@@ -188,7 +188,23 @@
</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>
<span class="comment"> - цвет элементов в плеере</span>
</div>
<div class="code">
<span class="comment">
Параметр <span class="attr-name">data-limit</span>
</span>
<br>
<span class="attr-name">data-limit=&quot;</span><span class="attr-value">5</span><span class="attr-name">&quot;</span>
<span class="comment"> - максимальное число торрентов</span>
</div>
<div class="code">
<span class="comment">
Параметр <span class="attr-name">data-button</span>
</span>
<br>
<span class="attr-name">data-button=&quot;</span><span class="attr-value">moonwalk: Плеер, hdgo: Онлайн</span><span class="attr-name">&quot;</span>
<span class="comment"> - названия кнопок</span>
</div>
<div class="code">
<span class="comment">
......
......@@ -31,9 +31,19 @@ function yo() {
? 'moonwalk,hdgo,kodik,allserials,iframe,trailer,torrent'
: options.player;
options.bg = (!options.bg)
? '#2A3440'
: options.bg;
var bg = (options.bg)
? options.bg
: '#2A3440';
if (options.button) {
var buttons = {};
options.button.split(',').forEach(function (button) {
var btn = button.split(':');
if (btn.length === 2 && btn[0] && btn[1]) {
buttons[btn[0].toLowerCase()] = btn[1].trim();
}
});
}
for (var data in options) {
if (options.hasOwnProperty(data) && options[data]) {
......@@ -51,7 +61,7 @@ function yo() {
}
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:' + options.bg + ' url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlN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TEuNCAyNC4zLTI1LjVjMC0xNi42LTEyLjgtMzAtMjguNi0zMCAtMTUuOCAwLTI4LjYgMTMuNS0yOC42IDMwIDAgOS4yIDMuNCAxNy45IDkuNiAyNC40IDYuMiA2LjUgMTQuNSAxMC4xIDIzLjIgMTAuMXMxNy0zLjYgMjMuMi0xMC4xYzYuMi02LjUgOS42LTE1LjIgOS42LTI0LjQgMC0xMC40LTMuOS0yMC4yLTEwLjktMjcuNiAtNy03LjQtMTYuMy0xMS40LTI2LjMtMTEuNHMtMTkuMyA0LjEtMjYuMyAxMS40UzEzIDQxLjggMTMgNTIuMmMwIDAuOS0wLjcgMS42LTEuNSAxLjZTMTAgNTMuMSAxMCA1Mi4yYzAtMTEuMyA0LjItMjEuOSAxMS44LTI5LjkgNy42LTggMTcuNy0xMi40IDI4LjQtMTIuNCAxMC43IDAgMjAuOCA0LjQgMjguNCAxMi40IDcuNiA4IDExLjggMTguNiAxMS44IDI5LjkgMCAxMC4xLTMuNyAxOS41LTEwLjUgMjYuN0M3My4xIDg2IDY0LjEgODkuOSA1NC41IDg5Ljl6IiBmaWxsPSIjZmZmIj48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InJvdGF0ZSIgZnJvbT0iMCA1MCA1MCIgdG89IjM2MCA1MCA1MCIgZHVyPSIxcyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz48L3BhdGg+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:' + bg + ' url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiIGNsYXNzPSJ1aWwtc3BpcmFsIj48cmVjdCB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgY2xhc3M9ImJrIiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTU0LjUgODkuOWMtOS42IDAtMTguNi0zLjktMjUuNC0xMSAtNi44LTcuMS0xMC41LTE2LjYtMTAuNS0yNi43IDAtOC45IDMuMy0xNy4yIDkuMi0yMy41UzQxLjcgMTkgNTAuMiAxOWM4LjQgMCAxNi40IDMuNCAyMi4zIDkuNyA2IDYuMyA5LjIgMTQuNiA5LjIgMjMuNSAwIDE1LjgtMTIuMiAyOC43LTI3LjMgMjguNyAtMTUgMC0yNy4zLTEyLjktMjcuMy0yOC43IDAtMTMuMyAxMC4zLTI0LjIgMjMtMjQuMnMyMyAxMC44IDIzIDI0LjJjMCAxMC44LTguNCAxOS42LTE4LjcgMTkuNiAtMTAuMyAwLTE4LjctOC44LTE4LjctMTkuNiAwLTguMyA2LjUtMTUuMSAxNC40LTE1LjEgNy45IDAgMTQuNCA2LjggMTQuNCAxNS4xIDAgNS44LTQuNSAxMC42LTEwLjEgMTAuNnMtMTAuMS00LjgtMTAuMS0xMC42YzAtMy40IDIuNi02LjEgNS44LTYuMSAzLjIgMCA1LjggMi43IDUuOCA2LjEgMCAwLjktMC43IDEuNi0xLjUgMS42IC0wLjggMC0xLjUtMC43LTEuNS0xLjYgMC0xLjYtMS4zLTIuOS0yLjgtMi45IC0xLjUgMC0yLjggMS4zLTIuOCAyLjkgMCA0LjEgMy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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:' + bg + ';cursor:pointer;opacity:1}';
s = document.createElement('style');
s.type = 'text/css';
if (s.styleSheet) {
......@@ -113,7 +123,11 @@ function yo() {
var option = document.createElement('div');
option.setAttribute('onclick', 'showPlayer("' + players[key] + '", this)');
option.dataset.iframe = players[key];
if (key === 'trailer') {
if (buttons.hasOwnProperty(key) && buttons[key]) {
j++;
option.innerText = j + '►' + buttons[key];
}
else if (key === 'trailer') {
j++;
option.innerText = j + '► ТРЕЙЛЕР';
}
......
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