Add url correcting in case user forgets http:// or https:// so url works properly in show view, remove upvote arrows from index view
This commit is contained in:
@ -119,10 +119,14 @@ exports.storySubmission = function(req, res, next) {
|
||||
.replace(/[^a-z0-9]/gi, ' ')
|
||||
.replace(/\s+/g, ' ')
|
||||
.toLowerCase();
|
||||
var link = data.link;
|
||||
if (link.search(/^https?:\/\//g) === -1) {
|
||||
link = 'http://' + link;
|
||||
}
|
||||
var story = new Story({
|
||||
headline: data.headline,
|
||||
timePosted: Date.now(),
|
||||
link: data.link,
|
||||
link: link,
|
||||
description: data.description,
|
||||
rank: 0,
|
||||
upVotes: 0,
|
||||
|
@ -19,11 +19,6 @@ h3
|
||||
|
||||
$(li).html("<div class='row text-left'>" +
|
||||
"<div class='col-xs-3 col-sm-1'>" +
|
||||
"<div class='row'>" +
|
||||
"<div class='col-xs-12 big-ion-up-arrow'>" +
|
||||
"<i class='ion-arrow-up-b'></i>" +
|
||||
"</div>" +
|
||||
"</div>" +
|
||||
"<div class='story-up-votes'>" +
|
||||
"<span>" + rank + "</span>" +
|
||||
"</div>" +
|
||||
|
Reference in New Issue
Block a user