scroll-into-view
Advanced tools
Comparing version 1.8.1 to 1.8.2
@@ -454,3 +454,2 @@ (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);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.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){ | ||
}).call(this,require('_process')) | ||
},{"_process":1}],6:[function(require,module,exports){ | ||
@@ -648,3 +647,2 @@ var raf = require('raf'), | ||
},{"raf":4}]},{},[2]) | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy5udm0vdmVyc2lvbnMvbm9kZS92Ni4zLjEvbGliL25vZGVfbW9kdWxlcy93YXRjaGlmeS9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwiLi4vLi4vLm52bS92ZXJzaW9ucy9ub2RlL3Y2LjMuMS9saWIvbm9kZV9tb2R1bGVzL3dhdGNoaWZ5L25vZGVfbW9kdWxlcy9wcm9jZXNzL2Jyb3dzZXIuanMiLCJleGFtcGxlL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL2NyZWwvY3JlbC5qcyIsIm5vZGVfbW9kdWxlcy9yYWYvaW5kZXguanMiLCJub2RlX21vZHVsZXMvcmFmL25vZGVfbW9kdWxlcy9wZXJmb3JtYW5jZS1ub3cvbGliL3BlcmZvcm1hbmNlLW5vdy5qcyIsInNjcm9sbEludG9WaWV3LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FDQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUF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2FjaGVkU2V0VGltZW91dCA9PT0gc2V0VGltZW91dCkge1xuICAgICAgICByZXR1cm4gc2V0VGltZW91dChmdW4sIDApO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBjYWNoZWRTZXRUaW1lb3V0LmNhbGwobnVsbCwgZnVuLCAwKTtcbiAgICB9XG59XG5mdW5jdGlvbiBydW5DbGVhclRpbWVvdXQobWFya2VyKSB7XG4gICAgaWYgKGNhY2hlZENsZWFyVGltZW91dCA9PT0gY2xlYXJUaW1lb3V0KSB7XG4gICAgICAgIGNsZWFyVGltZW91dChtYXJrZXIpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGNhY2hlZENsZWFyVGltZW91dC5jYWxsKG51bGwsIG1hcmtlcik7XG4gICAgfVxufVxudmFyIHF1ZXVlID0gW107XG52YXIgZHJhaW5pbmcgPSBmYWxzZTtcbnZhciBjdXJyZW50UXVldWU7XG52YXIgcXVldWVJbmRleCA9IC0xO1xuXG5mdW5jdGlvbiBjbGVhblVwTmV4dFRpY2soKSB7XG4gICAgaWYgKCFkcmFpbmluZyB8fCAhY3VycmVudFF1ZXVlKSB7XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgZHJhaW5pbmcgPSBmYWxzZTtcbiAgICBpZiAoY3VycmVudFF1ZXVlLmxlbmd0aCkge1xuICAgICAgICBxdWV1ZSA9IGN1cnJlbnRRdWV1ZS5jb25jYXQocXVldWUpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHF1ZXVlSW5kZXggPSAtMTtcbiAgICB9XG4gICAgaWYgKHF1ZXVlLmxlbmd0aCkge1xuICAgICAgICBkcmFpblF1ZXVlKCk7XG4gICAgfVxufVxuXG5mdW5jdGlvbiBkcmFpblF1ZXVlKCkge1xuICAgIGlmIChkcmFpbmluZykge1xuICAgICAgICByZXR1cm47XG4gICAgfVxuICAgIHZhciB0aW1lb3V0ID0gcnVuVGltZW91dChjbGVhblVwTmV4dFRpY2spO1xuICAgIGRyYWlu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gICAgICAgICAgICB0YXJnZXQudGV4dENvbnRlbnQgPSB0eXBlO1xuICAgICAgICB9KTtcbiAgICB9XG4gICAgYWxpZ24oKTtcblxuICAgIGZ1bmN0aW9uIGVhc2UoKXtcbiAgICAgICAgdGFyZ2V0LnRleHRDb250ZW50ID0gJ3Njcm9sbGluZyc7XG4gICAgICAgIHNjcm9sbEludG9WaWV3KHRhcmdldCwge1xuICAgICAgICAgICAgdGltZTogMTAwMCxcbiAgICAgICAgICAgIGFsaWduOntcbiAgICAgICAgICAgICAgICB0b3A6IDAsXG4gICAgICAgICAgICAgICAgbGVmdDogMC41XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZWFzZTogZnVuY3Rpb24odmFsdWUpe1xuICAgICAgICAgICAgICAgIHJldHVybiAxIC0gTWF0aC5wb3coMSAtIHZhbHVlLCB2YWx1ZSAvIDUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LCBmdW5jdGlvbih0eXBlKXtcbiAgICAgICAgICAgIHRhcmdldC50ZXh0Q29udGVudCA9IHR5cGU7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHZhciBzaWRlID0gMTtcbiAgICBmdW5jdGlvbiBidXR0b25UZXh0KCl7XG4gICAgICAgIHJldHVybiAnYWxpZ24gJyArIChzaWRlID8gJ3JpZ2h0JyA6ICdsZWZ0JykgKyAnIGVkZ2Ugd2l0aCBtZW51JztcbiAgICB9XG4gICAgZnVuY3Rpb24gbWVudUFsaWduKCl7XG4gICAgICAgIHRhcmdldC50ZXh0Q29udGVudCA9ICdzY3JvbGxpbmcnO1xuICAgICAgICBzY3JvbGxJbnRvVmlldyh0YXJnZXQsIHtcbiAgICAgICAgICAgIHRpbWU6IDEwMDAsXG4gICAgICAgICAgICBhbGlnbjp7XG4gICAgICAgICAgICAgICAgdG9wOiAwLjUsXG4gICAgICAgICAgICAgICAgbGVmdDogMCxcbiAgICAgICAgICAgICAgICBsZWZ0T2Zmc2V0OiBzaWRlID8gMjAwIDogNDAsXG4gICAgICAgICAgICAgICAgdG9wT2Zmc2V0OiAwXG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIGZ1bmN0aW9uKHR5cGUpe1xuICAgICAgICAgICAgdGFyZ2V0LnRleHRDb250ZW50ID0gdHlwZTtcbiAgICAgICAgfSk7XG4gICAgICAgIHNpZGUgPSAoc2lkZSArIDEpICUgMjtcbiAgICAgICAgYnV0dG9uMy50ZXh0Q29udGVudCA9IGJ1dHRvblRleHQoKTtcbiAgICB9XG5cbiAgICB2YXIgYnV0dG9uLFxuICAgICAgICBidXR0b24yO1xuXG4gICAgY3JlbChtZW51LFxuICAgICAgICBidXR0b24gPSBjcmVsKCdidXR0b24nLCB7J3N0eWxlJzond2lkdGg6IDE5MHB4J30sXG4gICAgICAgICAgICAnc2Nyb2xsIGludG8gdmlldydcbiAgICAgICAgKSxcbiAgICAgICAgYnV0dG9uMiA9IGNyZWwoJ2J1dHRvbicsIHsnc3R5bGUnOid3aWR0aDogMTkwcHgnfSxcbiAgICAgICAgICAgICdzY3JvbGwgaW50byB2aWV3IHdpdGggY3VzdG9tIGVhc2luZydcbiAgICAgICAgKSxcbiAgICAgICAgYnV0dG9uMyA9IGNyZWwoJ2J1dHRvbicsIHsnc3R5bGUnOid3aWR0aDogMTkwcHgnfSxcbiAgICAgICAgICAgIGJ1dHRvblRleHQoKVxuICAgICAgICApXG4gICAgKTtcblxuICAgIGJ1dHRvbi5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGFsaWduKTtcbiAgICBidXR0b24yLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgZWFzZSk7XG4gICAgYnV0dG9uMy5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIG1lbnVBbGlnbik7XG59KTsiLCIvL0NvcHlyaWdodCAoQykgMjAxMiBLb3J5IE51bm5cclxuXHJcbi8vUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBvZiBjaGFyZ2UsIHRvIGFueSBwZ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GlmKGNoaWxkID09IG51bGwpe1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmIChpc0FycmF5KGNoaWxkKSkge1xyXG4gICAgICAgICAgICAgICAgICBmb3IgKHZhciBpPTA7IGkgPCBjaGlsZC5sZW5ndGg7ICsraSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGFwcGVuZENoaWxkKGVsZW1lbnQsIGNoaWxkW2ldKTtcclxuICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgYXBwZW5kQ2hpbGQoZWxlbWVudCwgY2hpbGQpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmb3IodmFyIGtleSBpbiBzZXR0aW5ncyl7XHJcbiAgICAgICAgICAgIGlmKCFhdHRyaWJ1dGVNYXBba2V5XSl7XHJcbiAgICAgICAgICAgICAgICBlbGVtZW50LnNldEF0dHJpYnV0ZShrZXksIHNldHRpbmdzW2tleV0pO1xyXG4gICAgICAgICAgICB9ZWxzZXtcclxuICAgICAgICAgICAgICAgIHZhciBhdHRyID0gY3JlbC5hdHRyTWFwW2tleV07XHJcbiAgICAgICAgICAgICAgICBpZih0eXBlb2YgYXR0ciA9PT0gJ2Z1bmN0aW9uJyl7XHJcbiAgICAgICAgICAgICAgICAgICAgYXR0cihlbGVtZW50LCBzZXR0aW5nc1trZXldKTtcclxuICAgICAgICAgICAgICAgIH1lbHNle1xyXG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnQuc2V0QXR0cmlidXRlKGF0dHIsIHNldHRpbmdzW2tleV0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gZWxlbWVudDtcclxuICA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AgICAgICBwYXJlbnQgPSB3aW5kb3c7XG4gICAgICAgIH1cbiAgICB9XG59O1xuIl19 | ||
},{"raf":4}]},{},[2]); |
{ | ||
"name": "scroll-into-view", | ||
"version": "1.8.1", | ||
"version": "1.8.2", | ||
"description": "", | ||
@@ -14,5 +14,6 @@ "main": "scrollIntoView.js", | ||
"scripts": { | ||
"test": "browserify test/test.js -d -o test/test.browser.js && google-chrome ./test/test.html", | ||
"watchTest": "watchify test/test.js -d -o test/test.browser.js", | ||
"watchExample": "watchify example/index.js -d -o example/index.browser.js" | ||
"test": "browserify ./test/test.js -d -o ./test/test.browser.js && google-chrome ./test/test.html", | ||
"build": "browserify ./example/index.js > ./example/index.browser.js & browserify -g uglifyify ./standalone.js > ./scrollIntoView.min.js", | ||
"watchTest": "watchify ./test/test.js -d -o ./test/test.browser.js", | ||
"watchExample": "watchify ./example/index.js -d -o ./example/index.browser.js" | ||
}, | ||
@@ -19,0 +20,0 @@ "author": "", |
@@ -64,1 +64,13 @@ # scroll-into-view | ||
``` | ||
# Standalone | ||
If you want to use this module without browserify, you can use `scrollIntoView.min.js` | ||
``` | ||
<script src="scrollIntoView.min.js"></script> | ||
<script> | ||
window.scrollIntoView(someElement); | ||
</script> | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13
75
622118
8927
2
14