Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

auto-spa

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auto-spa

Automatically convert your basic html webpage in a fast spa.

latest
Source
npmnpm
Version
1.0.8
Version published
Weekly downloads
11
450%
Maintainers
1
Weekly downloads
 
Created
Source

NOTICE: I made this script for my personal use, so you may expect some bugs and it may not work in your case.

Automatic spa routing

This is a lightweight script (~4k unpacked) to transform your website routing to make it look faster and add a progress-bar.

This script may not work in your project if your stylesheets are ordered in a strange manner because the script appends only the new styles to the head and leaves the old ones in place.

Usage

<script src="https://cdn.jsdelivr.net/npm/auto-spa"></script>

or

import "auto-spa";

Customization

Right now, you can only customize the progressbar.

Default styles:

/* Container */
#auto-spa-progress {
  width: 100vw;
  height: 4px;
  background: #222;
  position: absolute;
  top: 0;
  left: 0;
}
/* inner progress */
#auto-spa-progress .progress {
  height: 4px;
  background: #ddd;
  width: 0%;
  transition: width 0.5s ease;
}

FAQs

Package last updated on 29 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts