Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

activist

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

activist - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

assets/cache.appcache

10

package.json
{
"name": "activist",
"description": "resilience to network interference",
"version": "0.1.0",
"version": "0.1.1",
"homepage": "https://github.com/willscott/activist",
"main": "activist.js",
"main": "express.js",
"browser": "activist.js",

@@ -36,3 +36,9 @@ "bugs": {

"webdriverio": "^2.4.5"
},
"dependencies": {
"browserify": "^10.2.4",
"etag": "^1.7.0",
"fresh": "^0.3.0",
"parseurl": "^1.3.0"
}
}

38

README.md
activist.js
===========
activist.js is a [freedom.js](http://freedomjs.com) application for loading
content through peers when a server is unavailable.
activist.js is a standalone library for making your site resilient to unexpected
network events.
Activist comes in 2 versions, which offer a trade-off between how much work you
need to do to add the library to your site, and how many of your users will be
able to take advantage of activist.js. New browsers provide features that make
able to take advantage of the work. New browsers provide features that make
the installation of activist.js as simple as adding a script tag to your home
page, however this version of the library will only work for a small percentage
of your user base. If you are willing to use activist in addition to an app
cache, it will be able to help a much larger fraction of your user base, but
requires additional changes to your site.
of your user base (up-to-date chrome users). Activist also is packaged with a
drop-in application cache manifst, which will extend the benefit to most users,
but can require wider site changes.

@@ -19,3 +19,3 @@ Deploying

1. Add activist.js
1. Add `activist.js` to your site.

@@ -26,8 +26,7 @@ ```html

2. Add Offline Cache (recommended)
Adding an application cache manifest will allow activist.js to run on many
more browsers, and is strongly recommended. Adding this cache is a 2 step
process. First, modify the ```html``` tag of your entry pages to reference
Adding an application cache manifest will allow activist.js to run on most
browsers, and is strongly recommended. Adding this cache is a 2 step
process. First, modify the ```html``` tag of your pages to reference
the cache. It should look something like this:

@@ -39,15 +38,10 @@

Sample appcaches are provided in the documentation of this repository.
The following is a minimal configuration for activating your hope page:
A sample appcache is available on [activistjs.com](http://activistjs.com).
```
CACHE MANIFEST
/
/activist.js
```
Note that the application cache should be served with the mime type
of 'text/cache-manifest'. More information on the application cache
mechanics are available on the [w3 website](http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html).
The application cache needs to be served with the mime type of
'text/cache-manifest' to work on old versions of internet explorer.
More information on application cache mechanics are available on the
[w3 website](http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html).
How?

@@ -54,0 +48,0 @@ ----

@@ -39,3 +39,3 @@ /*jslint node:true*/

var iframe = document.createElement('iframe');
iframe.src = 'activist-frame.html';
iframe.src = require('./config').frame;
iframe.style.display = 'none';

@@ -48,3 +48,4 @@ document.body.appendChild(iframe);

console.log("Registering service worker.");
fetchHandler.register(['activist-offline.html', 'activist.js']);
var config = require('./config');
fetchHandler.register([config.offline, config.url]);
};

@@ -51,0 +52,0 @@

@@ -6,2 +6,4 @@ /*jslint node:true*/

exports.url = '/activist.js';
exports.frame = '/activist-frame.html';
exports.offline = '/activist-offline.html';
exports.message = 'Your connection to this site was disrupted by your network. Consider an alternative method of access.';

@@ -8,0 +10,0 @@ exports.service = 'https://www.sitestat.us/status.js?l=';

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