Socket
Socket
Sign inDemoInstall

vanilla-back-to-top

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vanilla-back-to-top - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

2

package.json
{
"name": "vanilla-back-to-top",
"version": "6.0.0",
"version": "6.0.1",
"description": "Tiny and configurable Back To Top button with no dependencies",

@@ -5,0 +5,0 @@ "main": "dist/vanilla-back-to-top.umd.js",

@@ -24,7 +24,7 @@ # Vanilla Back To Top

```html
<script src="https://unpkg.com/vanilla-back-to-top@6.0.0/dist/vanilla-back-to-top.min.js"></script>
<script src="https://unpkg.com/vanilla-back-to-top@6.0.1/dist/vanilla-back-to-top.min.js"></script>
<script>addBackToTop()</script>
```
If you don't want to rely on [unpkg.com](https://unpkg.com/#/about), save [the file](https://unpkg.com/vanilla-back-to-top@6.0.0/dist/vanilla-back-to-top.min.js) to your project and serve it from your server:
If you don't want to rely on [unpkg.com](https://unpkg.com/#/about), save [the file](https://unpkg.com/vanilla-back-to-top@6.0.1/dist/vanilla-back-to-top.min.js) to your project and serve it from your server:
```html

@@ -85,6 +85,6 @@ <script src="/assets/vanilla-back-to-top.min.js"></script>

- Use [SVG icon](https://material.io/icons/#ic_keyboard_arrow_up) instead of `^` character: <img src="https://i.pi.gy/O1Ggw.png" width="66" />
- Use [SVG icon](https://material.io/icons/#ic_arrow_upward) instead of `^` character: <img src="https://i.pi.gy/YnL8p.png" width="65" />
```js
var backToTopSvg = document.createElement('span');
backToTopSvg.innerHTML = '<svg height="100%" viewBox="0 0 24 24" width="24px" xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="white"></path><path d="M0 0h24v24H0z" fill="none"></path></svg>';
backToTopSvg.innerHTML = '<svg height="100%" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z"/><path fill="#fff" d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"/></svg>';
addBackToTop({

@@ -91,0 +91,0 @@ innerElement: backToTopSvg

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc