Skip to content

Instantly share code, notes, and snippets.

@gbradley
Created June 12, 2015 08:47
Show Gist options
  • Select an option

  • Save gbradley/e7026c23db2c3411045d to your computer and use it in GitHub Desktop.

Select an option

Save gbradley/e7026c23db2c3411045d to your computer and use it in GitHub Desktop.
Application page
(function(){
var parts = decodeURI(window.location.search.replace('?','')).split('&'),
i = parts.length,
contact = [];
while (i--) {
parts[i] = parts[i].split('=');
if (parts[i][1]) {
if (parts[i][0] == 'email') {
contact.push('send your CV with a covering letter to ' + decodeURIComponent(parts[i][1]));
} else if (parts[i][0] == 'phone') {
contact.push('call ' + parts[i][1]);
}
}
}
if (contact.length) {
document.write('To apply for this job ' + contact.join(' or ') + '.');
} else {
document.write('The employer contact details can be found within the job description.');
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment