Скрыть объявление
ВАШИ ПРАВА ОГРАНИЧЕНЫ!

Зарегистрируйтесь на форуме, чтобы стать полноценным участником сообщества!

Изменить плейлист

Тема в разделе "Вопросы- ответы", создана пользователем rufil12, 8 мар 2016.

08.03.16 в 20:43
09.03.16 в 09:12
1
1.253
0
  1. TopicStarter Overlay
    rufil12

    rufil12 Новичок

    Регистрация:
    5 дек 2015
    Сообщения:
    31
    Лучших ответов:
    0
    Рейтинги:
    +13 / 0 / -0
    Ребята помогите пожалуйста, хочу сделать так выбирать плейлистами, если это фильм, это картинка один, если это сериалы второй картинка, где написано сезон я сам пишу

    var pos = 0;
    var poz = 0;
    var sea = null;
    var width = 530;
    var uvk = new Object();
    (uvk = {
    init: function () {
    document.write("<div id=\"uber-vk-write\" align=\"center\"> <ul id=\"uber-vk-season\"><li id=\"seasons\"></li></ul> <div id=\"uber-vk-player\"></div> <ul id=\"uber-vk-serial\"></ul> <a href=\"javascript://\" class=\"prev\" onclick=\"uvk.move(1);\">prev</a> <a href=\"javascript://\" class=\"next\" onclick=\"uvk.move(0);\">next</a> <a href=\"javascript://\" class=\"prev1\" onclick=\"uvk.move1(1);\">prev</a> <a href=\"javascript://\" class=\"next1\" onclick=\"uvk.move1(0);\">next</a> <\/div>")
    },
    player: function (a, b) {
    document.getElementById("uber-vk-player").innerHTML = "";
    var d = document.createElement("iframe");
    d.src = String(a);
    d.width = "100%";
    d.height = "360";
    d.setAttribute("border", "0");
    d.setAttribute("scrolling", "no");
    d.setAttribute("frameborder", "0");
    document.getElementById("uber-vk-player").appendChild(d);
    if (document.getElementById("uber-vk-serial")) {
    c = document.getElementById("uber-vk-serial").getElementsByTagName("span");
    for (var i = 0; i < c.length; i++) {
    c.removeAttribute("class")
    }
    }
    b.setAttribute("class", "active")
    },


    fastPerehod: function () {
    var selectedOzvuchka = $('#seasons>span.active').attr('onclick').substring(10,11),
    maxEpis = $('#season'+ selectedOzvuchka +'>span').get(-1),
    c = Number($('div#100500>.one').val()),
    d = $('#season' + selectedOzvuchka +'>span#'+c),
    maxNumber = parseInt(maxEpis.id);
    $('#season' + selectedOzvuchka + '>span.active').removeClass('active');
    if (isNaN(c)) {
    alert('Пожайлусто введите в поле только номер серии!')
    }
    if (parseInt(c) > maxNumber) {
    this.moveCurrent(maxNumber, maxNumber);
    maxEpis.click()
    }
    else {
    this.moveCurrent(parseInt(c), maxNumber);
    d.click()
    }
    },

    activSeriya: function () {
    var selectedOzvuchka = $('#seasons>span.active').attr('onclick').substring(10,11),
    hsa = $('#player-serial>li#season'+ selectedOzvuchka +'>span#1').click()
    },


    season: function (a, b) {
    if (document.getElementById("uber-vk-season")) {
    c = document.getElementById("uber-vk-season").getElementsByTagName("span");
    for (var i = 0; i < c.length; i++) {
    document.getElementById("season" + i).style.display = "none";
    c.removeAttribute("class")
    }
    document.getElementById("season" + a).style.display = "";
    sea = a
    }
    b.setAttribute("class", "active")
    },
    show: function (a, b) {
    for (var i = 0; i < a.length; i++) {
    document.getElementById("uber-vk-season").getElementsByTagName("li")[0].innerHTML += "<span onclick=\"uvk.season(" + i + ", this)\">" + a + "</span>";
    document.getElementById("uber-vk-serial").innerHTML += "<li id=\"season" + i + "\" style=\"display:none;\"></li>"
    }
    for (var i = 0; i < a.length; i++) {
    for (var j = 0; j < b.length; j++) {
    document.getElementById("season" + i).innerHTML += "<span onclick=\"uvk.player('" + b[j] + "', this);\">Серия " + (j + 1) + "</span>"
    }
    }
    document.getElementById("uber-vk-season").getElementsByTagName("span")[0].setAttribute("class", "active");
    document.getElementById("uber-vk-season").getElementsByTagName("span")[0].click();
    document.getElementById("season0").getElementsByTagName("span")[0].click();
    document.getElementById("season0").style.display = "";
    },
    move: function (d) {
    var a, b;
    var c = document.getElementById("seasons");
    var e = c.offsetWidth;
    var f = c.offsetLeft;
    if (d == 0) {
    clearTimeout(a);
    b = setInterval(function () {
    pos = pos - 10;
    if (pos >= (f - width) && pos >= -(e - width)) {
    c.style.left = pos + "px"
    } else clearTimeout(b)
    },
    15)
    }
    if (d == 1) {
    clearTimeout(b);
    b = setInterval(function () {
    pos = pos + 10;
    if (pos <= (f + width) && pos <= 0) {
    c.style.left = pos + "px"
    } else clearTimeout(b)
    },
    15)
    }
    },
    move1: function (d) {
    var a, b;
    var c = document.getElementById("season" + sea);
    var e = c.offsetWidth;
    var f = c.offsetLeft;
    if (d == 0) {
    clearTimeout(a);
    b = setInterval(function () {
    poz = poz - 10;
    if (poz >= (f - width) && poz >= -(e - width)) {
    c.style.left = poz + "px"
    } else clearTimeout(b)
    },
    15)
    }
    if (d == 1) {
    clearTimeout(b);
    b = setInterval(function () {
    poz = poz + 10;
    if (poz <= (f + width) && poz <= 0) {
    c.style.left = poz + "px"
    } else clearTimeout(b)
    },
    15)
    }
    },

    moveCurrent: function (current, totalCount) {
    var a, b;
    var c = doc.getElementById("season" + sea);
    var offWidth = c.offsetWidth;
    var f = c.offsetLeft;

    var elementOffWidth = offWidth / totalCount;

    var marginLeft = 443 - ((current - 1) * elementOffWidth);
    if(current > 70 && current <= 200) { marginLeft = marginLeft + 393};

    if(current >= 1 && current <= 5) { marginLeft = 0};
    poz = Math.abs(marginLeft) * -1;

    clearTimeout(a);
    b = setInterval(function () {
    // poz = poz - 10;
    //if (poz >= (f - width) && poz >= -(offWidth - width)) {
    // c.style.left = '-'+marginLeft + "px";
    c.style.left = poz + "px";
    clearTimeout(b);

    //} else clearTimeout(b)
    }, 15);
    }

    });

    var pos = 0;
    var poz = 0;
    var sea = null;
    var width = 600;
    var uvk = new Object();

    (uvk = {
    init: function () {

    document.write("<div id=\"uber-vk-write\" align=\"center\">\
    <ul id=\"uber-vk-season\"><li id=\"seasons\"></li></ul>\
    <div id=\"uber-vk-player\"></div>\
    <ul id=\"uber-vk-serial\"></ul>\
    <a href=\"javascript://\" class=\"prev\" onclick=\"uvk.move(1);\"></a>\
    <a href=\"javascript://\" class=\"next\" onclick=\"uvk.move(0);\"></a>\
    <a href=\"javascript://\" class=\"prev1\" onclick=\"uvk.movie(1);\"></a>\
    <a href=\"javascript://\" class=\"next1\" onclick=\"uvk.movie(0);\"></a>\
    <\/div>");
    }
    },
    player: function (a, b) {
    document.getElementById("uber-vk-player").innerHTML = "";
    var uvk = document.createElement("iframe");
    uvk.src = String(a);
    uvk.width = "680";
    uvk.height = "300";
    uvk.setAttribute("border", "0");
    uvk.setAttribute("frameborder", "0");
    uvk.setAttribute("scrolling", "no");
    uvk.setAttribute("allowFullScreen", "");
    document.getElementById("uber-vk-player").appendChild(uvk);
    if (document.getElementById("uber-vk-serial")) {
    c = document.getElementById("uber-vk-serial").getElementsByTagName("span");
    for (var i = 0; i < c.length; i++) {
    c.removeAttribute("class");
    }
    }
    b.setAttribute("class", "active");
    },
    season: function (a, b) {
    if (document.getElementById("uber-vk-season")) {
    c = document.getElementById("uber-vk-season").getElementsByTagName("span");
    for (var i = 0; i < c.length; i++) {
    document.getElementById("season-" + i).style.display = "none";
    c.removeAttribute("class");
    }

    d = document.getElementById("season-" + a).getElementsByTagName("span");
    for (var e = 1; e == d.length; e++) {
    document.getElementById("season-" + a).getElementsByTagName("span")[0].setAttribute("style", "display:none");
    document.getElementById("uber-vk-write").getElementsByClassName("prev1")[0].setAttribute("style", "display:none");
    document.getElementById("uber-vk-write").getElementsByClassName("next1")[0].setAttribute("style", "display:none");
    }
    document.getElementById("season-" + a).style.display = "";
    document.getElementById("season-" + a).getElementsByTagName("span")[0].click();
    document.getElementById("season-" + a).getElementsByTagName("span")[0].setAttribute("class", "active");
    if(e < d.length) {
    document.getElementById("uber-vk-write").getElementsByClassName("prev1")[0].setAttribute("style", "display:block");
    document.getElementById("uber-vk-write").getElementsByClassName("next1")[0].setAttribute("style", "display:block");
    }
    sea = a;
    }
    b.setAttribute("class", "active");
    uvk.movie(1);
    },
    show: function (a, b, c, d) {
    if(c > 1) {
    var t = a - 1;
    for (var i = 0; i < a; i++) {
    document.getElementById("uber-vk-serial").innerHTML += "<li id=\"season-" + i + "\"></li>";
    document.getElementById("uber-vk-season").getElementsByTagName("li")[0].innerHTML += "<span onclick=\"uvk.season('" + i + "', this)\">" + c + " Сезон</span>";
    }
    for (var i = 0; i < a; i++) {
    for (var j = 0; j < b.length; j++) {
    d = (d > 1) ? d : '';
    var h = (d || d > 1) ? j + d - 1 : j;
    document.getElementById("season-" + i).innerHTML += "<span onclick=\"uvk.player('" + b[j] + "', this);\">Серия " + (h + 1) + "</span>";
    }
    }
    var season = document.getElementById("uber-vk-season").getElementsByTagName("span");
    season[season.length-1].setAttribute("class", "active")
    season[season.length-1].click();
    var episode = document.getElementById("season-" + t).getElementsByTagName("span");
    episode[episode.length-1].click();
    } else if(a.length > 1) {
    var s = a[0]-1;
    var t = a.length - 1;
    for (var i = 0; i < a.length; i++) {
    document.getElementById("uber-vk-serial").innerHTML += "<li id=\"season-" + i + "\" style=\"display:none;\"></li>";
    document.getElementById("uber-vk-season").getElementsByTagName("li")[0].innerHTML += "<span onclick=\"uvk.season('" + i + "', this)\">" + (s + i + 1) + " Сезон</span>";
    }
    for (var i = 0; i < a.length; i++) {
    for (var j = 0; j < b.length; j++) {
    d = (d > 1) ? d : '';
    var h = (d || d > 1) ? j + d - 1 : j;
    document.getElementById("season-" + i).innerHTML += "<span onclick=\"uvk.player('" + b[j] + "', this);\">Серия " + (h + 1) + "</span>";
    }
    }
    var season = document.getElementById("uber-vk-season").getElementsByTagName("span");
    season[season.length-1].setAttribute("class", "active")
    season[season.length-1].click();
    var episode = document.getElementById("season-" + t).getElementsByTagName("span");
    episode[episode.length-1].click();
    document.getElementById("season-" + t).style.display = "";
    } else {
    var t = a - 1;
    for (var i = 0; i < a; i++) {
    if(c == 0 || !c) {
    var out = (i + 1) + " Сезон";
    } else if(c == 1) {
    var out = "Плеер " + (i + 1);
    }
    document.getElementById("uber-vk-serial").innerHTML += "<li id=\"season-" + i + "\" style=\"display:none;\"></li>";
    document.getElementById("uber-vk-season").getElementsByTagName("li")[0].innerHTML += "<span onclick=\"uvk.season('" + i + "', this)\">" + out + "</span>";
    }

    for (var i = 0; i < a; i++) {
    for (var j = 0; j < b.length; j++) {
    if(c == 0 || !c) {
    var out = "Серия";
    } else if(c == 1) {
    var out = "Часть";
    }
    d = (d > 1) ? d : '';
    var h = (d || d > 1) ? j + d - 1 : j;
    document.getElementById("season-" + i).innerHTML += "<span onclick=\"uvk.player('" + b[j] + "', this);\">" + out + " " + (h + 1) + "</span>";
    }
    }
    var season = document.getElementById("uber-vk-season").getElementsByTagName("span");
    season[season.length-1].setAttribute("class", "active")
    season[season.length-1].click();
    var episode = document.getElementById("season-" + t).getElementsByTagName("span");
    episode[episode.length-1].click();
    document.getElementById("season-" + t).style.display = "";
    }
    },
    move: function (d) {
    var a, b;
    var butt = document.getElementById("seasons");
    var widt = butt.offsetWidth;
    var left = butt.offsetLeft;
    if (d == 0) {
    clearTimeout(a);
    b = setInterval(function () {
    pos = pos - 10;
    if (pos >= (left - width) && pos >= -(widt - width)) {
    butt.style.left = pos + "px";
    } else clearTimeout(b);
    }, 15);
    }

    if (d == 1) {
    clearTimeout(b);
    b = setInterval(function () {
    pos = pos + 10;
    if (pos <= (left + width) && pos <= 0) {
    butt.style.left = pos + "px";
    } else clearTimeout(b);
    }, 15);
    }
    },
    movie: function (d) {
    var a, b;
    var butt = document.getElementById("season-" + sea);
    var widt = butt.offsetWidth;
    var left = butt.offsetLeft;

    if (d == 0) {
    clearTimeout(a);
    b = setInterval(function () {
    poz = poz - 10;
    if (poz >= (left - width) && poz >= -(widt - width)) {
    butt.style.left = poz + "px";
    } else clearTimeout(b);
    }, 15);
    }

    if (d == 1) {
    clearTimeout(b);
    b = setInterval(function () {
    poz = poz + 10;
    if (poz <= (left + width) && poz <= 0) {
    butt.style.left = poz + "px";
    } else clearTimeout(b);
    }, 15);
    }
    }
    });

    function showFilm( data ){
    var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    var o1, o2, o3, h1, h2, h3, h4, bits, i=0, enc='';
    do {
    h1 = b64.indexOf(data.charAt(i++));
    h2 = b64.indexOf(data.charAt(i++));
    h3 = b64.indexOf(data.charAt(i++));
    h4 = b64.indexOf(data.charAt(i++));
    bits = h1<<18 | h2<<12 | h3<<6 | h4;
    o1 = bits>>16 & 0xff;
    o2 = bits>>8 & 0xff;
    o3 = bits & 0xff;
    if (h3 == 64) enc += String.fromCharCode(o1);
    else if (h4 == 64) enc += String.fromCharCode(o1, o2);
    else enc += String.fromCharCode(o1, o2, o3);
    } while (i < data.length);
    return enc;
    }

    !function(t){var e={movie:!1,url:"http://rating.kinopoisk.ru",range:10,fix:1,order:["kinopoisk","imdb"],kinopoisk_template:'',imdb_template:'',cache_time:864e5,no_data:"Нет данных",show_zero_rating:!0},a={init:function(a){return this.each(function(){var r=t(this),n=t.extend({},e,r.data(),a);for(var i in n)if("movie"==i){var o=n.toString().split("/");o.length>1?n=o[4]:n=o[0]}r.data({params:n}),r.kinopoisk("getRating")})},getRating:function(){var e=t(this),r=e.data("params");if(!r.movie)throw"Не указан идентификатор фильма на кинопоиске (data-movie).";var n=a._getCache(e,r.movie);return n?a._showRating(e,n):void t.ajax({type:"GET",url:"http://query.yahooapis.com/v1/public/yql?q="+encodeURIComponent('select * from xml where url="'+r.url+"/"+r.movie+'.xml"')+"&format=xml&callback=?",dataType:"json",success:function(t){return n=a._setCache(e,r.movie,t.results[0]),a._showRating(e,n)},error:function(e){console.log(e),t.error(e.responseText)}})},_getCache:function(e,a){var r=e.data("params"),n=(new Date).getTime(),i=localStorage.getItem("movie_"+a);if(!i)return!1;var o=t.parseXML(i),s=t(o);return n-s.find("cache_time").text()>r.cache_time?(localStorage.removeItem("movie_"+a),!1):i},_setCache:function(e,a,r){var n=e.data("params"),i=(new Date).getTime(),o=localStorage.getItem("movie_"+a),s="<result>"+r+"<cache_time>"+i+"</cache_time></result>";if(o){var p=t.parseXML(o),c=t(p);i-c.find("cache_time").text()>n.cache_time?localStorage.setItem("movie_"+a,s):s=o}else localStorage.setItem("movie_"+a,s);return s},_showRating:function(e,r){var n=e.data("params");if(!r)throw'Проверьте правильность url "'+n.url+'"';var i=t.parseXML(r),o=t(i),s=o.find("kp_rating"),p=o.find("imdb_rating");if(0==s.text()&&0==s.attr("num_vote"))return n.no_data?e.html('<span>'+n.no_data+"</span>"):e;s.text(a.__roundRating(s,n.fix)),p.text(a.__roundRating(p,n.fix)),s.stars=a._getStar(s.text(),n.range),p.stars=a._getStar(p.text(),n.range);var c=a._getTemplate(n.kinopoisk_template,s),l=a._getTemplate(n.imdb_template,p);0==n.show_zero_rating&&(0==s.text()&&(c=""),0==p.text()&&(l=""));var m={kinopoisk:c,imdb:l},_="";for(var u in n.order)n.order.hasOwnProperty(u)&&"undefined"!=typeof m[n.order]&&(_+=m[n.order]);return e.hide().html('<span>'+_+"</span>").fadeIn()},__roundRating:function(t,e){return Math.round(parseFloat(t.text())*Math.pow(10,e))/Math.pow(10,e)},_getTemplate:function(t,e){return t.replace("$rating",e.text()).replace("$vote",e.attr("num_vote")).replace("$stars",e.stars)},_getStar:function(t,e){for(var a="",r=Math.round(t*e/10),n=1;e>=n;n++)a+=r>=n?"<span>&#9733;</span>":"<span>&#9734;</span>";return a}};t.fn.kinopoisk=function(e){try{if(a[e]){if("_"==e.charAt(0))throw"Нельзя вызывать приватный метод";return a[e].apply(this,Array.prototype.slice.call(arguments,1))}if("object"!=typeof e&&e)throw"Метод "+e+" не найден";return a.init.apply(this,arguments)}catch(r){t.error(r)}}}(jQuery);

    +function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d.call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery)

    +function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdsds",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdsds",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdsds");d||c.data("bs.dropdsds",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdsds-backdrop",f='[data-toggle="dropdsds"]',g=function(b){a(b).on("click.bs.dropdsds",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdsds-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdsds",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdsds",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdsds-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdsds;a.fn.dropdsds=d,a.fn.dropdsds.Constructor=g,a.fn.dropdsds.noConflict=function(){return a.fn.dropdsds=h,this},a(document).on("click.bs.dropdsds.data-api",c).on("click.bs.dropdsds.data-api",".dropdsds form",function(a){a.stopPropagation()}).on("click.bs.dropdsds.data-api",f,g.prototype.toggle).on("keydown.bs.dropdsds.data-api",f,g.prototype.keydown).on("keydown.bs.dropdsds.data-api",".dropdsds-menu",g.prototype.keydown)}(jQuery)

    function alertWindow(text,error){
    $("#regpopup").remove()
    $("body").append('<div id="regpopup">'+text+'</div>');
    if(error) $("#regpopup").addClass('error');
    $("#regpopup").slideDown(400);
    setTimeout(function(){$("#regpopup").hide(function(){$(this).remove()})},3000);
    }

    function favToggle(tag,area){
    $.post(dle_root+"engine/mods/favs/toggle.php",{newsid:newsid,area:area},function(d){
    if(d.error) alertWindow(d.error,1);
    else tag.toggleClass('current');
    },"json");
    }
    $(document)
    .on('click','.fastreg-trig',function(e){
    $('.fastreg-area').slideToggle(200);
    e.preventDefault();
    })
    .on('mouseenter','.menu-favs-trig',function(){
    $('.menu-favs-ul').slideDown(200);
    })
    .on('mouseleave','.menu-favs',function(){
    $('.menu-favs-ul').slideUp(200);
    })
    .on('click','#fastreg-go',function(){
    var email = $("#fastreg-email").val();
    if(!email) return false;
    $.post(dle_root+"engine/mods/fastreg/reg.php",{email:email},function(d){
    if(d.error) alertWindow(d.error,1);
    else alertWindow('Ссылка для продолжения регистрации отправлена на указанный E-Mail',0);
    },"json");
    })
    .on('click','.favorites-button',function(e){
    favToggle($(this),'favorites');
    e.preventDefault();
    })
    .on('click','.tosee-button',function(e){
    favToggle($(this),'tosee');
    e.preventDefault();
    })
    .on('click','.follow-button',function(e){
    favToggle($(this),'follow');
    e.preventDefault();
    })
    .on('click','.fav-unsub',function(e){
    var $this = $(this);
    $.post(dle_root+"engine/mods/favs/toggle.php",{newsid:$this.data('id'),area:$this.data('area')},function(d){
    if(d.error) alertWindow(d.error,1);
    else $this.parents('li').hide(300,function(){$(this).remove()});
    },"json");
    e.preventDefault();
    })
    .on('click','.favpage-block-h',function(e){
    $(this).parents('.favpage-block').find('.content-video').slideToggle(400);
    e.preventDefault();
    })
    .on('click','.favpage-block-more-add',function(e){
    var ul = $(this).parents('.favpage-block').find('ul');
    var row = $(this).parent().data('row')+1;
    var rows = $(this).parent().data('rows');
    var del = $(this).parent().find('.favpage-block-more-del');
    if(row>1) del.show();
    $(this).parent().data('row',row);
    if(row==rows) $(this).hide();
    ul.animate({height:row*260},700);
    e.preventDefault();
    })
    .on('click','.favpage-block-more-del',function(e){
    var ul = $(this).parents('.favpage-block').find('ul');
    var row = $(this).parent().data('row')-1;
    var rows = $(this).parent().data('rows');
    var add = $(this).parent().find('.favpage-block-more-add');
    if(row<rows) add.show();
    $(this).parent().data('row',row);
    if(row==1) $(this).hide();
    ul.animate({height:row*260},700);
    e.preventDefault();
    })

    var newsid = 0;
    $(function(){
    newsid = $(".favbutts").data('id');
    if(jQuery.inArray( newsid, favorites_arr )>=0) $(".favorites-button").addClass('current');
    if(jQuery.inArray( newsid, tosee_arr )>=0) $(".tosee-button").addClass('current');
    if(jQuery.inArray( newsid, follow_arr )>=0) $(".follow-button").addClass('current');
    if(follow_new>0){
    $(".menu-favs-trig").addClass('hasNew');
    $("#followed").append('<span>+'+follow_new+'</span>');
    }

    $(".favpage-block").each(function(){
    var li = $(this).find('li');
    if(li.length>6) $(this).find('ul').after('<div class="favpage-block-more" data-rows="'+Math.ceil(li.length/6)+'" data-row="1"><a href="#" class="favpage-block-more-del">Скрыть &uarr;</a><a href="#" class="favpage-block-more-add">Еще&darr;</a></div>');
    })
    })

    $(document)
    .on('click', '.show-trailer', function(){
    $('body').append('<div id="ps-overlay-wrap" class="loading" tabindex="-1"></div>');
    $("#ps-overlay-wrap").fadeIn(200);
    $.post(dle_root+"engine/mods/trailer/index.php",{id:$(this).data('id')},function(d){
    $("#ps-overlay-wrap").removeClass('loading').html(d);
    })
    })
    .on('click', '.fulltrailer', function(e){
    $('body').append('<div id="ps-overlay-wrap" class="loading" tabindex="-1"></div>');
    $("#ps-overlay-wrap").fadeIn(200);
    $.post(dle_root+"engine/mods/trailer/index.php",{id:$(this).data('id'),full:1},function(d){
    $("#ps-overlay-wrap").removeClass('loading').html(d);
    })
    e.preventDefault();
    })
    .on('click', '#ps-close, #ps-overlay-wrap', function(){
    $("#ps-overlay-wrap").fadeOut(300,function(){$(this).remove()});
    })
    .on('click','.zcomm-like:not(.disabled)',function(e){
    $(this).addClass('disabled');
    var cr = $(this).parent().find('.zcomm-likes');
    $.post(dle_root+"engine/mods/comlike/index.php",{id:$(this).data('id')},function(d){
    if(d=='ok') cr.html(parseInt(cr.text())+1).addClass('positive');
    else alertWindow(d,1);
    });
    e.preventDefault();
    })
    .on('focus','.zc-textarea',function(e){
    $('.zshort').removeClass('zshort');
    pinload();
    })
    .on("click",".simple-pin-code ul li",function(){
    $.post(dle_root+"engine/mods/sPin/ajax.php",{id:$(this).index(),do:'click'},function(d){
    if(d==1){
    $(".simple-pin-check").hide();
    $(".simple-pin-notbot").show();
    }else{
    var prnb = new Date().getTime();
    $(".simple-pin-code ul").css({backgroundImage:"url(/engine/mods/sPin/image.php?r="+prnb+")"});
    $(".spincode").html(d);
    }
    });
    })

    function pinload(){
    $(".simple-pin-check").show();
    $(".simple-pin-notbot").hide();
    $.post(dle_root+"engine/mods/sPin/ajax.php",{},function(d){
    var prnb = new Date().getTime();
    $(".simple-pin-code ul").css({backgroundImage:"url(/engine/mods/sPin/image.php?r="+prnb+")"}).html('<li>1</li><li>2</li><li>3</li><li>4</li>');
    $(".spincode").html(d);
    });
    }

    $(function(){

    $('.zcomm-likes').each(function(){
    if(parseInt($(this).text())>0) $(this).addClass('positive');
    });
    })

    $(document)
    .on('click','.season-h a',function(e){
    var t = $(this).text();
    var nt = $(this).data('text');
    $(this).data('text',t);
    $(this).html(nt);
    $(this).parents('.season-area').find('.season-list').slideToggle(400);
    e.preventDefault();
    })
    .on('click','.season-showallep a',function(e){
    $(this).parents('.season-area').find('tr').show();
    $(this).remove();
    e.preventDefault();
    })
    .on('click','.season-mark',function(){
    var $this = $(this);
    $this.toggleClass('season-mark-viewed');
    $.post(dle_root+"engine/mods/series/ajax.php",{short:$this.data('short'),newsid:$this.parents('.season-area').data('id')},function(d){
    if(d!=1){
    alertWindow(d,1);
    $this.toggleClass('season-mark-viewed');
    }
    })
    })

    $(function(){
    var season_tr = $(".season-area:eq(0) .season-list table");
    var season_tr_limit = 7;
    if(season_tr.find('tr').length>season_tr_limit){
    season_tr.find('tr').each(function(i){
    if(i>=season_tr_limit) $(this).hide();
    })
    season_tr.after('<div class="season-showallep"><a href="#">показать все серии</a></div>');
    }
    [/b]
     

    Вложения:

    • 1.png
      1.png
      Размер файла:
      15,4 КБ
      Просмотров:
      65
    • 2.png
      2.png
      Размер файла:
      19,3 КБ
      Просмотров:
      65
  2. byroot

    Забанен

    Регистрация:
    10 окт 2015
    Сообщения:
    12.297
    Лучших ответов:
    54
    Рейтинги:
    +5.205 / 74 / -0
    Обычные табы! Настраивай CSS им или выдирай с нужного сайта...
     
Похожие темы
  1. razrushutel
    Ответов:
    2
    Просмотров:
    1.330
  2. djusel
    Ответов:
    56
    Просмотров:
    5.457
  3. djusel
    Ответов:
    16
    Просмотров:
    2.358
  4. vasili
    Ответов:
    0
    Просмотров:
    660
Загрузка...
Яндекс.Метрика