PluginProbe ʕ •ᴥ•ʔ
Download Manager / 3.3.63
Download Manager v3.3.63
3.3.65 3.3.64 3.3.63 3.3.62 3.3.61 3.3.60 3.3.59 3.3.58 3.3.57 3.3.56 trunk 2.1.3 2.3.0 2.5.96 2.5.97 2.6.2 2.6.96 2.8.3 2.9.99 3.0.4 3.1.05 3.1.07 3.1.08 3.1.11 3.1.12 3.1.14 3.1.17 3.1.18 3.1.22 3.1.23 3.1.24 3.1.25 3.1.26 3.1.27 3.1.28 3.2.04 3.2.13 3.2.14 3.2.16 3.2.18 3.2.19 3.2.21 3.2.22 3.2.23 3.2.24 3.2.25 3.2.27 3.2.28 3.2.29 3.2.30 3.2.31 3.2.32 3.2.33 3.2.34 3.2.35 3.2.37 3.2.38 3.2.39 3.2.40 3.2.41 3.2.42 3.2.43 3.2.44 3.2.45 3.2.46 3.2.47 3.2.48 3.2.49 3.2.50 3.2.51 3.2.52 3.2.53 3.2.54 3.2.55 3.2.56 3.2.57 3.2.58 3.2.59 3.2.60 3.2.61 3.2.63 3.2.64 3.2.65 3.2.66 3.2.67 3.2.68 3.2.69 3.2.70 3.2.71 3.2.72 3.2.73 3.2.74 3.2.75 3.2.76 3.2.77 3.2.78 3.2.79 3.2.80 3.2.81 3.2.82 3.2.83 3.2.84 3.2.85 3.2.86 3.2.87 3.2.88 3.2.89 3.2.90 3.2.91 3.2.92 3.2.93 3.2.94 3.2.95 3.2.96 3.2.97 3.2.98 3.2.99 3.3.00 3.3.01 3.3.02 3.3.03 3.3.04 3.3.05 3.3.06 3.3.07 3.3.08 3.3.09 3.3.10 3.3.11 3.3.12 3.3.13 3.3.14 3.3.15 3.3.16 3.3.17 3.3.18 3.3.19 3.3.20 3.3.21 3.3.22 3.3.23 3.3.24 3.3.25 3.3.26 3.3.27 3.3.28 3.3.29 3.3.30 3.3.31 3.3.32 3.3.33 3.3.34 3.3.35 3.3.36 3.3.37 3.3.38 3.3.39 3.3.40 3.3.41 3.3.42 3.3.43 3.3.44 3.3.45 3.3.46 3.3.47 3.3.48 3.3.49 3.3.50 3.3.51 3.3.52 3.3.53 3.3.54 3.3.55
download-manager / assets / js / simple-scrollbar.js
download-manager / assets / js Last commit date
ads 8 months ago control 8 months ago img 10 years ago blocker.js 2 weeks ago blocker.min.js 2 weeks ago embed.js 5 years ago embed.min.js 7 months ago front.js 3 days ago front.min.js 3 days ago jquery-ui-timepicker-addon.js 10 years ago jquery-ui-timepicker-addon.min.js 7 months ago jquery.dataTables.min.js 1 year ago jquery.validate.js 7 months ago jquery.validate.min.js 2 weeks ago jqueryFileTree.js 5 years ago jqueryFileTree.min.js 7 months ago overwatch.js 7 months ago overwatch.min.js 7 months ago password-strength.js 2 years ago password-strength.min.js 7 months ago simple-scrollbar.js 7 months ago simple-scrollbar.min.js 7 months ago simplebar.js 6 years ago validator.min.js 9 years ago vue.js 9 months ago vue.min.js 9 months ago wpdm-admin.js 2 weeks ago wpdm-admin.min.js 2 weeks ago wpdm.js 6 months ago wpdm.min.js 6 months ago
simple-scrollbar.js
166 lines
1 ;(function(root, factory) {
2 if (typeof exports === 'object') {
3 module.exports = factory(window, document)
4 } else {
5 root.SimpleScrollbar = factory(window, document)
6 }
7 })(this, function(w, d) {
8 var raf = w.requestAnimationFrame || w.setImmediate || function(c) { return setTimeout(c, 0); };
9
10 function initEl(el) {
11 Object.defineProperty(el, 'data-simple-scrollbar', { value: new SimpleScrollbar(el), configurable: true });
12 }
13
14 function unbindEl(el) {
15 if (!Object.prototype.hasOwnProperty.call(el, 'data-simple-scrollbar')) return;
16 el['data-simple-scrollbar'].unBind();
17 //Remove the elements property
18 delete el['data-simple-scrollbar'];
19 }
20
21 // Mouse drag handler
22 function dragDealer(el, context) {
23 var lastPageY;
24
25 el.addEventListener('mousedown', function(e) {
26 lastPageY = e.pageY;
27 el.classList.add('ss-grabbed');
28 d.body.classList.add('ss-grabbed');
29
30 d.addEventListener('mousemove', drag);
31 d.addEventListener('mouseup', stop);
32
33 return false;
34 });
35
36 function drag(e) {
37 var delta = e.pageY - lastPageY;
38 lastPageY = e.pageY;
39
40 raf(function() {
41 context.el.scrollTop += delta / context.scrollRatio;
42 });
43 }
44
45 function stop() {
46 el.classList.remove('ss-grabbed');
47 d.body.classList.remove('ss-grabbed');
48 d.removeEventListener('mousemove', drag);
49 d.removeEventListener('mouseup', stop);
50 }
51 }
52
53 // Constructor
54 function ss(el) {
55 this.target = el;
56 this.content = el.firstElementChild;
57
58 this.direction = w.getComputedStyle(this.target).direction;
59
60 this.bar = '<div class="ss-scroll">';
61 //Create a reference to the function binding to remove the event listeners
62 this.mB = this.moveBar.bind(this);
63
64 this.wrapper = d.createElement('div');
65 this.wrapper.setAttribute('class', 'ss-wrapper');
66
67 this.el = d.createElement('div');
68 this.el.setAttribute('class', 'ss-content');
69
70 if (this.direction === 'rtl') {
71 this.el.classList.add('rtl');
72 }
73
74 this.wrapper.appendChild(this.el);
75
76 while (this.target.firstChild) {
77 this.el.appendChild(this.target.firstChild);
78 }
79 this.target.appendChild(this.wrapper);
80
81 this.target.insertAdjacentHTML('beforeend', this.bar);
82 this.bar = this.target.lastChild;
83
84 dragDealer(this.bar, this);
85 this.moveBar();
86
87 w.addEventListener('resize', this.mB);
88 this.el.addEventListener('scroll', this.mB);
89 this.el.addEventListener('mouseenter', this.mB);
90
91 this.target.classList.add('ss-container');
92
93 var css = w.getComputedStyle(el);
94 if (css['height'] === '0px' && css['max-height'] !== '0px') {
95 el.style.height = css['max-height'];
96 }
97
98 this.unBind = function() {
99 //Remove event listeners
100 w.removeEventListener('resize', this.mB);
101 this.el.removeEventListener('scroll', this.mB);
102 this.el.removeEventListener('mouseenter', this.mB);
103
104 this.target.classList.remove('ss-container');
105
106 //Unwrap the initial content and remove remaining wrappers
107 this.target.insertBefore(this.content, this.wrapper);
108 this.target.removeChild(this.wrapper);
109
110 //Remove the bar including its drag-dealer event listener
111 this.target.removeChild(this.bar);
112 this.bar = null; //make way for the garbage collector
113 }
114 }
115
116 ss.prototype = {
117 moveBar: function(e) {
118 var totalHeight = this.el.scrollHeight,
119 ownHeight = this.el.clientHeight,
120 _this = this;
121
122 this.scrollRatio = ownHeight / totalHeight;
123
124 var isRtl = _this.direction === 'rtl';
125 var right = isRtl ?
126 (_this.target.clientWidth - _this.bar.clientWidth + 18) :
127 (_this.target.clientWidth - _this.bar.clientWidth) * -1;
128
129 raf(function() {
130 // Hide scrollbar if no scrolling is possible
131 if(_this.scrollRatio >= 1) {
132 _this.bar.classList.add('ss-hidden')
133 } else {
134 _this.bar.classList.remove('ss-hidden')
135 _this.bar.style.cssText = 'height:' + Math.max(_this.scrollRatio * 100, 10) + '%; top:' + (_this.el.scrollTop / totalHeight ) * 100 + '%;right:' + right + 'px;';
136 }
137 });
138 }
139 }
140
141 function initAll() {
142 var nodes = d.querySelectorAll('*[ss-container]');
143
144 for (var i = 0; i < nodes.length; i++) {
145 initEl(nodes[i]);
146 }
147 }
148
149 function unbindAll() {
150 var nodes = d.querySelectorAll('.ss-container');
151
152 for (var i = 0; i < nodes.length; i++) {
153 unbindEl(nodes[i]);
154 }
155 }
156
157 d.addEventListener('DOMContentLoaded', initAll);
158 ss.initEl = initEl;
159 ss.initAll = initAll;
160 ss.unbindEl = unbindEl;
161 ss.unbindAll = unbindAll;
162
163 var SimpleScrollbar = ss;
164 return SimpleScrollbar;
165 });
166