-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated several security/persmissions to publish extension.
- Loading branch information
1 parent
45d7d06
commit 7488fe4
Showing
6 changed files
with
118 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
'use strict'; | ||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
|
||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
|
||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
|
||
var Options = function (_React$Component) { | ||
_inherits(Options, _React$Component); | ||
|
||
function Options(props) { | ||
_classCallCheck(this, Options); | ||
|
||
var _this = _possibleConstructorReturn(this, (Options.__proto__ || Object.getPrototypeOf(Options)).call(this, props)); | ||
|
||
_this.state = { value: 'time' }; | ||
|
||
_this.handleChange = _this.handleChange.bind(_this); | ||
_this.handleSubmit = _this.handleSubmit.bind(_this); | ||
return _this; | ||
} | ||
|
||
_createClass(Options, [{ | ||
key: 'handleChange', | ||
value: function handleChange(event) { | ||
this.setState({ value: event.target.value }); | ||
} | ||
}, { | ||
key: 'handleSubmit', | ||
value: function handleSubmit(event) { | ||
event.preventDefault(); | ||
this.props.mode(this.state.value); | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
return React.createElement( | ||
'form', | ||
{ onSubmit: this.handleSubmit }, | ||
React.createElement( | ||
'label', | ||
null, | ||
React.createElement( | ||
'select', | ||
{ value: this.state.value, onChange: this.handleChange }, | ||
React.createElement( | ||
'option', | ||
{ value: 'time' }, | ||
'time' | ||
), | ||
React.createElement( | ||
'option', | ||
{ value: 'worldRank' }, | ||
'wr' | ||
), | ||
React.createElement( | ||
'option', | ||
{ value: 'continentRank' }, | ||
'cr' | ||
), | ||
React.createElement( | ||
'option', | ||
{ value: 'countryRank' }, | ||
'nr' | ||
) | ||
) | ||
), | ||
React.createElement('input', { type: 'submit', value: 'Submit' }) | ||
); | ||
} | ||
}]); | ||
|
||
return Options; | ||
}(React.Component); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
'use strict'; | ||
|
||
class Options extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = {value: 'time'}; | ||
|
||
this.handleChange = this.handleChange.bind(this); | ||
this.handleSubmit = this.handleSubmit.bind(this); | ||
} | ||
|
||
handleChange(event) { | ||
this.setState({value: event.target.value}); | ||
|
||
} | ||
|
||
handleSubmit(event) { | ||
event.preventDefault(); | ||
this.props.mode(this.state.value); | ||
} | ||
|
||
render() { | ||
return ( | ||
<form onSubmit={this.handleSubmit}> | ||
<label> | ||
<select value={this.state.value} onChange={this.handleChange}> | ||
<option value="time">time</option> | ||
<option value="worldRank">wr</option> | ||
<option value="continentRank">cr</option> | ||
<option value="countryRank">nr</option> | ||
</select> | ||
</label> | ||
<input type="submit" value="Submit" /> | ||
</form> | ||
); | ||
} | ||
} |