📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
sikayetscripti.demodesign.com.tr
/
js
📝
ticker.min.js
← Geri Dön
"use strict"; var defaultOptions = { item: "div", pauseOnHover: !1, speed: 60, pauseAt: "", delay: 500 }, rafSupported = !0; function getSupportedTransform() { for (var t = "transform WebkitTransform MozTransform OTransform msTransform".split(" "), e = document.createElement("div"), n = 0; n < t.length; n++) if (e && void 0 !== e.style[t[n]]) return t[n]; return !1 } var requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(t) { rafSupported = !1, window.setTimeout(t, 1e3 / 60) }, logger = function(t) { return function() {} }, log$1 = logger("brain"), FPSs = [60], tickers = []; function getFps() { if (!rafSupported) return 60; var t = FPSs.length; return FPSs.reduce(function(t, e) { return t + e }) / t } var brain = { get fps() { return getFps() }, get tickers() { return tickers }, init: function(t) { var e = 0, n = 0; if (requestAnimFrame(function t() { e++, tickers.length && tickers.forEach(function(t) { return t.advance() }), requestAnimFrame(t) }), rafSupported) { var r = void 0; t(window).on("load focus", function() { log$1("Frame Count: %d, FPS Interval: %d", e, n), !r && document.hasFocus() && (n = e, r = setInterval(function() { var t = e - n; for (FPSs.push(t); FPSs.length > 10;) FPSs.shift(); log$1(getFps()), n = e }, 1e3)) }).on("blur", function() { clearInterval(r), r = null }) } } }, asyncGenerator = function() { function t(t) { this.value = t } function e(e) { var n, r; function i(n, r) { try { var a = e[n](r), o = a.value; o instanceof t ? Promise.resolve(o.value).then(function(t) { i("next", t) }, function(t) { i("throw", t) }) : s(a.done ? "return" : "normal", a.value) } catch (t) { s("throw", t) } } function s(t, e) { switch (t) { case "return": n.resolve({ value: e, done: !0 }); break; case "throw": n.reject(e); break; default: n.resolve({ value: e, done: !1 }) }(n = n.next) ? i(n.key, n.arg): r = null } this._invoke = function(t, e) { return new Promise(function(s, a) { var o = { key: t, arg: e, resolve: s, reject: a, next: null }; r ? r = r.next = o : (n = r = o, i(t, e)) }) }, "function" != typeof e.return && (this.return = void 0) } return "function" == typeof Symbol && Symbol.asyncIterator && (e.prototype[Symbol.asyncIterator] = function() { return this }), e.prototype.next = function(t) { return this._invoke("next", t) }, e.prototype.throw = function(t) { return this._invoke("throw", t) }, e.prototype.return = function(t) { return this._invoke("return", t) }, { wrap: function(t) { return function() { return new e(t.apply(this, arguments)) } }, await: function(e) { return new t(e) } } }(), classCallCheck = function(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }, createClass = function() { function t(t, e) { for (var n = 0; n < e.length; n++) { var r = e[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r) } } return function(e, n, r) { return n && t(e.prototype, n), r && t(e, r), e } }(), log$2 = logger("class"), Ticker = function() { function t(e, n) { classCallCheck(this, t), this.elem = e, this.settings = n, this.__offset = 0, this.__pauseTracker = 0, this.build() } return createClass(t, [{ key: "build", value: function() { var t = this; if (!this.started) { this.started = !0; var e = document.createElement("div"); e.className = "js-ticker-track", this.elem.addClass("js-ticker"), this.elem.children(this.settings.item).addClass("js-ticker-item").appendTo(e), this.elem.append(e), this.track = this.elem.find(".js-ticker-track"), this.__items = this.track.children(".js-ticker-item"), this.__first = this.__items.first(), this.__first.attr("data-first", !0); var n = this.elem.width() + this.__first.width(); for (log$2("(Pre Clones) Target Width: %d, Actual: %d", n, this.elem[0].scrollWidth); this.elem[0].scrollWidth < n;) this.__items.each(function(e) { t.track.append(t.__items.eq(e).clone()) }); log$2("(Post Clones) Target Width: %d, Actual: %d", n, this.elem[0].scrollWidth); this.settings.pauseOnHover && function e() { t.elem.one("mouseenter", function() { t.__pauseTracker++, t.elem.one("mouseleave", function() { t.__pauseTracker--, e() }) }) }(), this.elem.addClass("active"), this.elem.data("ticker", this), brain.tickers.push(this) } } }, { key: "advance", value: function() { var t = this; if (this.__width = this.__first.outerWidth(), !this.__pauseTracker) { this.__offset += this.settings.speed / brain.fps, this.__offset > this.__width && (this.__offset = 0, this.__first.appendTo(this.track), this.__first = this.track.children(".js-ticker-item").first(), ("item" === this.settings.pauseAt || "track" === this.settings.pauseAt && this.__first.data("first")) && (this.__pauseTracker++, setTimeout(function() { return t.__pauseTracker-- }, this.settings.delay))); var e = getSupportedTransform(); e ? this.track.css(e, "translateX(" + -this.__offset + "px)") : this.track.css("left", -this.__offset + "px") } } }, { key: "pause", value: function() { this.__manuallyPaused || (this.__pauseTracker++, this.__manuallyPaused = !0) } }, { key: "play", value: function() { this.__manuallyPaused && (this.__pauseTracker--, this.__manuallyPaused = !1) } }, { key: "toggle", value: function() { this.__manuallyPaused ? this.play() : this.pause() } }], [{ key: "version", get: function() { return "0.0.1" } }]), t }(), log = logger("entry"); ! function(t) { if (!t) return console.warn("Whoa there, buddy! Looks like you included the jQuery Ticker plugin without including jQuery first."); t.ticker = function(e, n) { return new Ticker(t(e), n) }, t.fn.ticker = function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; return this.each(function() { t.ticker(this, t.extend(!0, {}, defaultOptions, e)) }) }, brain.init(t) }("undefined" != typeof jQuery ? jQuery : null);
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula