Skip to content

Commit

Permalink
show update page on first install 🙈 rename jpm script
Browse files Browse the repository at this point in the history
  • Loading branch information
owise1 committed Apr 4, 2016
1 parent ca68667 commit 1045847
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .jpmignore
@@ -1,3 +1,9 @@
node_modules/
.git
.gitignore
**.swp
**.DS_Store
!node_modules/ramda/*
node_modules/ramda/.eslintignore
node_modules/ramda/.jshintignore
node_modules/ramda/.eslintrc
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -45,7 +45,7 @@ Then open `data/popup.html` in a browser
#### To run extension in the browser:

```
npm run run
npm run jpm
```

#### How it currently works
Expand Down
53 changes: 43 additions & 10 deletions data/js/popup.js
Expand Up @@ -16300,7 +16300,10 @@ var ReactDOMOption = {
}
});

nativeProps.children = content;
if (content) {
nativeProps.children = content;
}

return nativeProps;
}

Expand Down Expand Up @@ -22469,7 +22472,7 @@ module.exports = ReactUpdates;

'use strict';

module.exports = '0.14.6';
module.exports = '0.14.7';
},{}],88:[function(require,module,exports){
/**
* Copyright 2013-2015, Facebook, Inc.
Expand Down Expand Up @@ -23564,6 +23567,7 @@ var warning = require('fbjs/lib/warning');
*/
var EventInterface = {
type: null,
target: null,
// currentTarget is set when dispatching; no use in copying it here
currentTarget: emptyFunction.thatReturnsNull,
eventPhase: null,
Expand Down Expand Up @@ -23597,8 +23601,6 @@ function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEvent
this.dispatchConfig = dispatchConfig;
this.dispatchMarker = dispatchMarker;
this.nativeEvent = nativeEvent;
this.target = nativeEventTarget;
this.currentTarget = nativeEventTarget;

var Interface = this.constructor.Interface;
for (var propName in Interface) {
Expand All @@ -23609,7 +23611,11 @@ function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEvent
if (normalize) {
this[propName] = normalize(nativeEvent);
} else {
this[propName] = nativeEvent[propName];
if (propName === 'target') {
this.target = nativeEventTarget;
} else {
this[propName] = nativeEvent[propName];
}
}
}

Expand Down Expand Up @@ -27475,6 +27481,8 @@ module.exports = require('./lib/React');
},{"./lib/React":27}],160:[function(require,module,exports){
'use strict';

var has = Object.prototype.hasOwnProperty;

//
// We store our EE objects in a plain object whose properties are event names.
// If `Object.create(null)` is not supported we prefix the event names with a
Expand All @@ -27490,7 +27498,7 @@ var prefix = typeof Object.create !== 'function' ? '~' : false;
*
* @param {Function} fn Event handler to be called.
* @param {Mixed} context Context for function execution.
* @param {Boolean} once Only emit once
* @param {Boolean} [once=false] Only emit once
* @api private
*/
function EE(fn, context, once) {
Expand All @@ -27509,13 +27517,38 @@ function EE(fn, context, once) {
function EventEmitter() { /* Nothing to set */ }

/**
* Holds the assigned EventEmitters by name.
* Hold the assigned EventEmitters by name.
*
* @type {Object}
* @private
*/
EventEmitter.prototype._events = undefined;

/**
* Return an array listing the events for which the emitter has registered
* listeners.
*
* @returns {Array}
* @api public
*/
EventEmitter.prototype.eventNames = function eventNames() {
var events = this._events
, names = []
, name;

if (!events) return names;

for (name in events) {
if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
}

if (Object.getOwnPropertySymbols) {
return names.concat(Object.getOwnPropertySymbols(events));
}

return names;
};

/**
* Return a list of assigned event listeners.
*
Expand Down Expand Up @@ -27601,8 +27634,8 @@ EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
* Register a new EventListener for the given event.
*
* @param {String} event Name of the event.
* @param {Functon} fn Callback function.
* @param {Mixed} context The context of the function.
* @param {Function} fn Callback function.
* @param {Mixed} [context=this] The context of the function.
* @api public
*/
EventEmitter.prototype.on = function on(event, fn, context) {
Expand All @@ -27626,7 +27659,7 @@ EventEmitter.prototype.on = function on(event, fn, context) {
*
* @param {String} event Name of the event.
* @param {Function} fn Callback function.
* @param {Mixed} context The context of the function.
* @param {Mixed} [context=this] The context of the function.
* @api public
*/
EventEmitter.prototype.once = function once(event, fn, context) {
Expand Down
9 changes: 8 additions & 1 deletion index.js
Expand Up @@ -3,6 +3,7 @@ const { defer } = require('sdk/core/promise')
var ss = require("sdk/simple-storage")
var pageMod = require("sdk/page-mod")
var data = require("sdk/self").data
var tabs = require('sdk/tabs')
var { ToggleButton } = require('sdk/ui/button/toggle')
var panels = require("sdk/panel")
var self = require("sdk/self")
Expand Down Expand Up @@ -92,7 +93,6 @@ function communication (worker){
worker.port.emit('exhibitionError', true)
}
})

})
}

Expand Down Expand Up @@ -155,5 +155,12 @@ function go(){
}
}
})

// installed for the first time?
if (!ss.storage.lastOpen) {
ss.storage.lastOpen = Date.now()
tabs.open('http://add-art.org/update')
}

}

4 changes: 2 additions & 2 deletions package.json
@@ -1,7 +1,7 @@
{
"title": "Add-Art",
"name": "add-art",
"version": "2.2.0",
"version": "2.2.2",
"id" : "development@add-art.org",
"description": "Replace ads with art.",
"main": "index.js",
Expand All @@ -12,7 +12,7 @@
"scripts": {
"watch": "watchify -t [ babelify --presets react ] src/popup.js -o data/js/popup.js",
"build": "browserify -t [ babelify --presets react ] src/popup.js -o data/js/popup.js",
"run" : "npm run build; jpm run"
"jpm" : "npm run build; jpm run"
},
"license": "GPL-3.0",
"keywords": [
Expand Down

0 comments on commit 1045847

Please sign in to comment.