mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-20 22:52:46 -05:00
57 lines
No EOL
1.8 KiB
JavaScript
57 lines
No EOL
1.8 KiB
JavaScript
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
|
var onScroll = require("../onScroll.js");
|
|
|
|
onScroll(function(top) {
|
|
console.log('Body Scroll: ' + top);
|
|
});
|
|
},{"../onScroll.js":3}],2:[function(require,module,exports){
|
|
(function (global){
|
|
(function(root) {
|
|
var unopinionate = {
|
|
selector: root.jQuery || root.Zepto || root.ender || root.$,
|
|
template: root.Handlebars || root.Mustache
|
|
};
|
|
|
|
/*** Export ***/
|
|
|
|
//AMD
|
|
if(typeof define === 'function' && define.amd) {
|
|
define([], function() {
|
|
return unopinionate;
|
|
});
|
|
}
|
|
//CommonJS
|
|
else if(typeof module.exports !== 'undefined') {
|
|
module.exports = unopinionate;
|
|
}
|
|
//Global
|
|
else {
|
|
root.unopinionate = unopinionate;
|
|
}
|
|
})(typeof window != 'undefined' ? window : global);
|
|
|
|
}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
},{}],3:[function(require,module,exports){
|
|
var $ = require('unopinionate').selector;
|
|
|
|
var bodyScrollers = [];
|
|
|
|
$(function() {
|
|
var $html = $('html'),
|
|
$body = $('body');
|
|
|
|
$(window, document, 'body').bind('scroll touchmove', function() {
|
|
var top = $html[0].scrollTop || $body[0].scrollTop;
|
|
|
|
for(var i=0; i<bodyScrollers.length; i++) {
|
|
bodyScrollers[i](top);
|
|
}
|
|
});
|
|
});
|
|
|
|
var onScroll = function(callback) {
|
|
bodyScrollers.push(callback);
|
|
};
|
|
|
|
module.exports = onScroll;
|
|
},{"unopinionate":2}]},{},[1]) |