Homepage JavaScript
// BCLD Homepage Tweaks
// Kendall Purser
// January 2024
var app = {
get: function(tmp_id) {
return document.getElementById(tmp_id);
},
getc: function(clss) {
return document.getElementsByClassName(clss);
},
init: function () {
app.search_rename();
app.http_fix();
},
search_rename: function () {
var tmp_btn = app.getc(“wp-block-search__button”)[0];
tmp_btn.innerHTML = “Go”;
tmp_btn.style[“padding”] = “5px 10px;”
app.getc(“wp-block-search__input”)[0].placeholder = “Site Search”;
},
http_fix: function () {
// Doesn’t get rid of the HTTPS error but it makes me feel a little better about myself.
var tmp_img = app.getc(“credit-logo”)[0].innerHTML;
console.log(tmp_img);
tmp_img = tmp_img.replace(“http”,”https”);
app.getc(“credit-logo”)[0].innerHTML = tmp_img;
}
}
app.init();