Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
Display "no target given" for…submissions without a target
Browse files Browse the repository at this point in the history
  • Loading branch information
theopolisme committed Sep 28, 2013
1 parent 52c212c commit bb8a0c2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/redirects.js
Expand Up @@ -123,7 +123,12 @@ function afcHelper_redirect_init() {
if (afcHelper_RedirectSubmissions[k] === '' || afcHelper_RedirectSubmissions[k] === ' ') {
text += 'Empty submission \#' + afcHelper_Redirect_empty + '<ul>';
afcHelper_Redirect_empty++;
} else text += '<a href="' + wgArticlePath.replace("$1", encodeURIComponent(afcHelper_RedirectSubmissions[k].to)) + '">' + afcHelper_RedirectSubmissions[k].to + '</a>: <ul>';
} else {
if (afcHelper_RedirectSubmissions[k].to.replace(/\s/g,''))
text += '<a href="' + wgArticlePath.replace("$1", encodeURIComponent(afcHelper_RedirectSubmissions[k].to)) + '">' + afcHelper_RedirectSubmissions[k].to + '</a>: <ul>';
else
text += '<b>no target given</b>: <ul>'
}
for (var l = 0; l < afcHelper_RedirectSubmissions[k].from.length; l++) {
var from = afcHelper_RedirectSubmissions[k].from[l];
text += "<li>From: " + from.title + '<br/><label for="afcHelper_redirect_action_' + from.id + '">Action: </label>' + afcHelper_generateSelect('afcHelper_redirect_action_' + from.id, [{
Expand Down

0 comments on commit bb8a0c2

Please sign in to comment.