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

appcache-nanny

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appcache-nanny - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

35

appcache-nanny.js

@@ -61,2 +61,7 @@ // appCacheNanny

var DEFAULT_MANIFEST_LOADER_PATH = '/appcache-loader.html';
var nannyOptions = {
loaderPath: DEFAULT_MANIFEST_LOADER_PATH
};
//

@@ -141,2 +146,30 @@ //

//
//
//
appCacheNanny.set = function setOption(key, value) {
var property, newSettings;
if (typeof key === 'object') {
newSettings = key;
for (property in newSettings) if (newSettings.hasOwnProperty(property)) {
nannyOptions[property] = newSettings[property];
}
return;
}
nannyOptions[key] = value;
};
//
//
//
appCacheNanny.get = function getOption(key) {
var property, settings = {};
if (key) return nannyOptions[key];
for (property in nannyOptions) if (nannyOptions.hasOwnProperty(property)) {
settings[property] = nannyOptions[property];
}
return settings;
};
// Private

@@ -186,3 +219,3 @@ // -------

iframe = document.createElement('iframe');
iframe.src = '/appcache-loader.html';
iframe.src = nannyOptions.loaderPath;
iframe.style.display = 'none';

@@ -189,0 +222,0 @@ iframe.onload = function() {

2

bower.json
{
"name": "appcache-nanny",
"version": "0.0.2",
"version": "0.0.3",
"authors": [

@@ -5,0 +5,0 @@ "Gregor Martynus <gregor@martynus.net>"

{
"name": "appcache-nanny",
"version": "0.0.2",
"version": "0.0.3",
"description": "Teaches the applicationCache douchebag some manners!",

@@ -5,0 +5,0 @@ "main": "appcache-nanny.js",

@@ -9,4 +9,4 @@ The appCache Nanny

No more manifest attributes on your HTML files. Weathere you want to cache
your assets offline or not, when to start ... you are in control™
No more manifest attributes on your HTML files. Whether you want to cache
your assets offline or not, when to start ... You Are In Control™

@@ -38,7 +38,13 @@ Have a glance:

// plus some extra ones
appCacheNanny.on('init:downloading', handleInitDownloading);
appCacheNanny.on('init:progress', handleInitProgress);
appCacheNanny.on('init:cached', handleInitCached);
appCacheNanny.on('start', handleStart);
appCacheNanny.on('stop', handleStop);
appCacheNanny.on('init:downloading', handleInitDownloading)
appCacheNanny.on('init:progress', handleInitProgress)
appCacheNanny.on('init:cached', handleInitCached)
appCacheNanny.on('start', handleStart)
appCacheNanny.on('stop', handleStop)
// options
appCacheNanny.set('loaderPath', '/path/to/my-custom-loader.html')
appCacheNanny.set({ 'loaderPath': '/path/to/my-custom-loader.html' })
appCacheNanny.get('loaderPath')
appCacheNanny.get() // returns all options
```

@@ -45,0 +51,0 @@

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