Skip to content

Instantly share code, notes, and snippets.

@SeanJA
Created October 21, 2013 23:51
Show Gist options
  • Save SeanJA/7092884 to your computer and use it in GitHub Desktop.
Save SeanJA/7092884 to your computer and use it in GitHub Desktop.
from view-source:https://www.healthcare.gov/ lines 1538 - 1551
// What?
if ('en' == 'es') {
langCode = 'es_MX';
var url = window.location.href.replace('cuidadodesalud.gov','healthcare.gov').replace('/es/','/');
$('.span1 a.btn-mini.btn-lang, #header .lang').removeClass('nodisplay').attr('href', url);
}
// What what?
if ('en' == 'en') {
langCode = 'en_US';
if (''.length > 0) {
var url = window.location.href.replace('','/es');
} else {
var url = window.location.protocol + '//' + window.location.host + '/es' + window.location.pathname + window.location.hash;
}
$('.span1 a.btn-mini.btn-lang, #header .lang').removeClass('nodisplay').attr('href', url);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment