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

app-loading

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-loading - npm Package Compare versions

Comparing version 0.0.43 to 0.0.51

app-loading.min.css

6

app-loading.js
/*
* app-loading
* (c) 2015
* github.com/aprilorange/app-loading
* github.com/egoist/app-loading
*/

@@ -31,2 +31,3 @@

this.showBar(color);
return this;
}

@@ -37,2 +38,3 @@ }, {

this.hideBar();
return this;
}

@@ -78,2 +80,4 @@ }, {

this.opts.color = color;
this.getBar().style.backgroundColor = color;
return this;
}

@@ -80,0 +84,0 @@ }]);

2

app-loading.min.js

@@ -1,2 +0,2 @@

"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();!function(){var e=function(e,t){var o=function(){function e(){_classCallCheck(this,e),this.opts={className:"app-loading",loadingBar:".loading-bar",color:null}}return _createClass(e,[{key:"start",value:function(e){this.showBar(e)}},{key:"stop",value:function(){this.hideBar()}},{key:"showBar",value:function(e){var o=this.getBar();this.opts.color&&(o.style.backgroundColor=this.opts.color),e&&(o.style.backgroundColor=e),t.querySelector("body").classList.add(this.opts.className)}},{key:"hideBar",value:function(){t.querySelector("body").classList.remove(this.opts.className),this.getBar().style.backgroundColor=null}},{key:"getBar",value:function(){var e=t.querySelector(this.opts.loadingBar);return e||(e=this.initBar()),e}},{key:"initBar",value:function(){var e=t.createElement("div");return e.className=this.opts.loadingBar.substring(1),t.body.appendChild(e),e}},{key:"setColor",value:function(e){this.opts.color=e}}]),e}();return new o};!function(e,t,o){"undefined"!=typeof module?module.exports=o:"undefined"!=typeof e&&(e[t]=o)}(window,"appLoading",e(window,document))}();
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();!function(){var e=function(e,t){var o=function(){function e(){_classCallCheck(this,e),this.opts={className:"app-loading",loadingBar:".loading-bar",color:null}}return _createClass(e,[{key:"start",value:function(e){return this.showBar(e),this}},{key:"stop",value:function(){return this.hideBar(),this}},{key:"showBar",value:function(e){var o=this.getBar();this.opts.color&&(o.style.backgroundColor=this.opts.color),e&&(o.style.backgroundColor=e),t.querySelector("body").classList.add(this.opts.className)}},{key:"hideBar",value:function(){t.querySelector("body").classList.remove(this.opts.className),this.getBar().style.backgroundColor=null}},{key:"getBar",value:function(){var e=t.querySelector(this.opts.loadingBar);return e||(e=this.initBar()),e}},{key:"initBar",value:function(){var e=t.createElement("div");return e.className=this.opts.loadingBar.substring(1),t.body.appendChild(e),e}},{key:"setColor",value:function(e){return this.opts.color=e,this.getBar().style.backgroundColor=e,this}}]),e}();return new o};!function(e,t,o){"undefined"!=typeof module?module.exports=o:"undefined"!=typeof e&&(e[t]=o)}(window,"appLoading",e(window,document))}();
//# sourceMappingURL=app-loading.min.js.map

@@ -9,2 +9,3 @@ 'use strict';

var rename = require('gulp-rename')
var qunit = require('gulp-qunit')

@@ -35,2 +36,9 @@ gulp.task('serve', serve({

gulp.task('test', function() {
gulp.src('./test/index.html')
.pipe(qunit({
timeout: 20
}))
})
gulp.task('watch', function() {

@@ -42,2 +50,2 @@ return gulp.watch('./lib/*.js', ['js'])

gulp.task('default', ['build', 'serve', 'watch'])
gulp.task('default', ['build', 'serve', 'test', 'watch'])
/*
* app-loading
* (c) 2015
* github.com/aprilorange/app-loading
* github.com/egoist/app-loading
*/

@@ -21,2 +21,3 @@

this.showBar(color)
return this
}

@@ -26,2 +27,3 @@

this.hideBar()
return this
}

@@ -62,2 +64,4 @@

this.opts.color = color
this.getBar().style.backgroundColor = color
return this
}

@@ -80,2 +84,1 @@

}()
{
"name": "app-loading",
"version": "0.0.43",
"version": "0.0.51",
"description": "Focus on Medium-like app loading style",
"main": "app-loading.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "gulp test",
"dev": "gulp",

@@ -22,2 +22,3 @@ "build": "gulp build"

"gulp-babel": "^5.2.1",
"gulp-qunit": "^1.2.1",
"gulp-rename": "^1.2.2",

@@ -24,0 +25,0 @@ "gulp-serve": "^1.0.0",

@@ -36,2 +36,8 @@ # app-loading

appLoading.start('rgba(76, 207, 177, 0.7)')
// use on server side
if (typeof window !== 'undefined') {
import appLoading from 'app-loading'
appLoading.start()
}
```

@@ -41,2 +47,6 @@

**v0.0.5** - 2015/09/03
- Fix `setColor` and add test
**v0.0.4** - 2015/08/22

@@ -43,0 +53,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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