1
Fork 0

add more urls

This commit is contained in:
Jake Howard 2016-01-30 00:18:23 +00:00
parent 7ca316df94
commit 8c1c5f10cc
3 changed files with 7 additions and 5 deletions

View file

@ -14,7 +14,8 @@ export default class ProjectImage extends React.Component {
if (this.props.data.link.startsWith('#')) { if (this.props.data.link.startsWith('#')) {
this.setState({url: this.props.data.link}); this.setState({url: this.props.data.link});
} else { } else {
Reverser(this.props.data.link) const args = this.props.data.args || false;
Reverser(this.props.data.link, args)
.then(function (url) { .then(function (url) {
this.setState({ url }); this.setState({ url });
}.bind(this)) }.bind(this))

View file

@ -12,7 +12,8 @@ const DATA = [
{ {
title: 'BSOD-Enabler', title: 'BSOD-Enabler',
text: 'Ever wanted to bring up a Blue Screen of Death on command, well now you can!', text: 'Ever wanted to bring up a Blue Screen of Death on command, well now you can!',
link: '', link: 'projects:project',
args: 'bsod-enabler'
}, },
{ {
title: 'Yoga Pal', title: 'Yoga Pal',

View file

@ -2,9 +2,9 @@ export default function Reverser(ident, args) {
let body = {}; let body = {};
if (ident) { if (ident) {
body.ident = ident; body.ident = ident;
} if (args) {
if (args) { body.args = args;
body.args = args; }
} }
body = JSON.stringify(body); body = JSON.stringify(body);
return fetch('/reverse/', { return fetch('/reverse/', {