|
|
|
@ -88,8 +88,12 @@ $(".view-main").on("click", "#historylist .history-list-item", function () {
|
|
|
|
|
|
|
|
|
|
// Restore user's last entered city/state combo
|
|
|
|
|
if (inStorage("citystate")) {
|
|
|
|
|
$("input[name=citystate]").val(getStorage("citystate"));
|
|
|
|
|
$("input[name=citystate]").val(getStorage("citystate").replace(/\s*[0-9]{5}$/, ""));
|
|
|
|
|
}
|
|
|
|
|
if (inStorage("zipcode")) {
|
|
|
|
|
if (inStorage("zipcode") && getStorage("zipcode").trim() != "") {
|
|
|
|
|
$("input[name=zipcode]").val(getStorage("zipcode"));
|
|
|
|
|
} else {
|
|
|
|
|
if (inStorage("citystate") && /^.+ [0-9]{5}$/.test(getStorage("citystate"))) {
|
|
|
|
|
$("input[name=zipcode]").val(getStorage("citystate").split(" ").pop());
|
|
|
|
|
}
|
|
|
|
|
}
|