Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var cookies = document.cookie.split(";");
for (var i=0;i<cookies.length;i++) {
if (cookies[i].indexOf("app_locale") > -1) {
var language = cookies[i].split("=")[1]
}
}
if (language == "fr_CA") {
$(document).ready(function() {
// Changes in 417.html page
var elem = document.getElementsByClassName("fr_CA_417");
console.log(elem);
for (var i=0;i<elem.length;i++) {
elem[i].style.fontSize = "1.1em";
}
// Changes in _recipes_growing_banner.html
var elem = document.getElementsByClassName("free-snap");
for (var i=0;i<elem.length;i++) {
elem[i].style.fontSize = "2.65em";
}
});
}
if (language == "es_MX") {
$(document).ready(function() {
// Changes in 417.html page
var elem = document.getElementsByClassName("fr_CA_417");
console.log(elem);
for (var i=0;i<elem.length;i++) {
elem[i].style.fontSize = "1.1em";
}
// Changes in _recipes_growing_banner.html
var elem = document.getElementsByClassName("sbtn");
for (var i=0;i<elem.length;i++) {
elem[i].style.fontSize = "1.16em";
elem[i].style.width = "35em";
}
// Changes in _recipes_growing_banner.html
var elem = document.getElementsByClassName("free-snap");
for (var i=0;i<elem.length;i++) {
elem[i].style.fontSize = "2.65em";
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.