/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ var trackingcoderegex = /^[0-9a-zA-Z]{5,40}$/; function openTrackingInfoPage(code) { if (typeof code == "undefined" || code == null || code.trim() == "") { app.input.validate("#trackingcode"); app.toast.show({ text: "Please enter a tracking code.", position: "bottom", closeTimeout: 2000 }); return; } router.navigate("/track/" + code); } function addTrackingSuggestions() { $("#tracking-history-list ul").html(""); var history = getTrackingHistory(); if (history == false || history.length == 0) { $("#tracking-history-list ul").html('