Skip to content

Commit

Permalink
v2.1.0 - Removed support for using the script in browsers directly as…
Browse files Browse the repository at this point in the history
… it was broken anyway.
  • Loading branch information
Stanko committed Mar 8, 2021
1 parent 2772413 commit 8643c20
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 23 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

### v2.1.0

08.03.2020.

**Removed**

* Removed support for using the script in browsers directly. It was broken, so probably was not using it anyway. Use version 1 if you really need it.

-----

### v2.0.12

27.10.2020.
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,6 @@ const EasingFunctions = {
}
```

### Usage in the browser directly

It is not recommended but you can use `animateScrollTo` directly in the browser, by including `lib/animated-scroll-to.js` in your page. Please note this file is not minified.

## Why?

I wasn't able to find standalone, simple and working solution.
Expand Down
8 changes: 0 additions & 8 deletions lib/animated-scroll-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,3 @@ function animateScrollTo(numberOrCoordsOrElement, userOptions) {
});
}
exports.default = animateScrollTo;
// Support for direct usage in browsers
// This is mostly to keep it similar to v1
// Don't forget to include Promise polyfill for IE
// <script src="https://unpkg.com/es6-promise/dist/es6-promise.auto.min.js"></script>
// https://github.com/stefanpenner/es6-promise
if (WINDOW_EXISTS) {
window.animateScrollTo = animateScrollTo;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "animated-scroll-to",
"version": "2.0.12",
"version": "2.1.0",
"description": "Simple, plain JavaScript animated window scroll",
"main": "./lib/animated-scroll-to.js",
"types": "./lib/animated-scroll-to.d.ts",
Expand Down
10 changes: 0 additions & 10 deletions src/animated-scroll-to.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,3 @@ async function animateScrollTo(
}

export default animateScrollTo;

// Support for direct usage in browsers
// This is mostly to keep it similar to v1
// Don't forget to include Promise polyfill for IE
// <script src="https://unpkg.com/es6-promise/dist/es6-promise.auto.min.js"></script>
// https://github.com/stefanpenner/es6-promise
if (WINDOW_EXISTS) {
(window as any).animateScrollTo = animateScrollTo;
}

0 comments on commit 8643c20

Please sign in to comment.