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.4 to 0.0.41

2

app-loading.js

@@ -30,3 +30,2 @@ /***********************************************

value: function start(color) {
console.log('start');
this.showBar(color);

@@ -37,3 +36,2 @@ }

value: function stop() {
console.log('stop');
this.hideBar();

@@ -40,0 +38,0 @@ }

2

app-loading.min.js

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

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

@@ -20,3 +20,2 @@ /***********************************************

start(color) {
console.log('start')
this.showBar(color)

@@ -26,3 +25,2 @@ }

stop() {
console.log('stop')
this.hideBar()

@@ -29,0 +27,0 @@ }

{
"name": "app-loading",
"version": "0.0.4",
"version": "0.0.41",
"description": "Focus on Medium-like app loading style",

@@ -5,0 +5,0 @@ "main": "app-loading.js",

@@ -37,39 +37,2 @@ # app-loading

## ECMAScript 2015
**bower install app-loading-es6**
A.K.A ES6, please refer to https://github.com/aprilorange/app-loading-es6
## LiveScript
A really simple implement in LiveScript, not yet full-featured. [Live edit on JS Bin](http://jsbin.com/wowera/edit?js,output)
```livescript
((W, D) ->
class appLoading
$$ = D.query-selector.bind document
init-bar = ->
bar = D.create-element \div
bar.className = \loading-bar
D.body.appendChild bar
get-bar = ->
init-bar! if not $$ \.loading-bar
$$ \.loading-bar
@start = ->
get-bar!
D.body.classList.add \app-loading
@stop = ->
D.body.classList.remove \app-loading
W.appLoading = appLoading
) window, document
```
## Changelog

@@ -76,0 +39,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