PageSourceSearch

https://www.lumen.ca/js/knockout/configuration.js?v=qrP6JA5HlA5u5M…qrP6JA5HlA5u5MYfW771bXTO3inKb7felj78DsrGYtE

js lumen.ca collected 2026-09-24 12:14:52 UTC 2,828 bytes, 86 lines download raw bytes

1ko.bindingHandlers.numeric = {
2    init: function (element, valueAccessor) {
3        $(element).on("keydown", function (event) {
4            // Allow: backspace, delete, tab, escape, and enter
5            if (event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || event.keyCode == 13 ||
6                // Allow: Ctrl+A
7                (event.keyCode == 65 && event.ctrlKey === true) ||
8                // Allow: home, end, left, right
9                (event.keyCode >= 35 && event.keyCode <= 39)) {
10                // let it happen, don't do anything
11                return;
12            }
13            else {
14                // Ensure that it is a number and stop the keypress
15                if (event.shiftKey || (event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105)) {
16                    event.preventDefault();
17                }
18            }
19        });
20    }
21};
22
23function getLocation(reload, successCallback) {
24    if (!reload && cookieExists("user_position") && hasPosition()){
25        return;
26    }
27    if (reload){
28        deleteCookie("block_position");
29    }
30    if (navigator.geolocation) {
31        if (cookieExists("block_position")){
32            return;
33        }
34        navigator.geolocation.getCurrentPosition(function (position){ 
35            onSuccess(position, reload, successCallback);
36        }, onError, { enableHighAccuracy: true, timeout: 5000 })
37    }
38}
39
40function onError(){
41    document.cookie = ("block_position=true;Path=/");
42}
43function onSuccess(position, reload, successCallback){
44    const name = "user_position";
45    const cookie = getCookie(name);
46    let preferredWarehouse = "";
47    if (cookie) {
48        preferredWarehouse = JSON.parse(decodeURIComponent(decodeURIComponent(cookie))).preferredWarehouse;
49    }
50
51    const value = encodeURIComponent(JSON.stringify({ position: { latitude: position.coords.latitude, longitude: position.coords.longitude }, preferredWarehouse: preferredWarehouse }));
52    document.cookie = (name + "=" + value + ";Path=/");
53    if (successCallback){
54        successCallback();
55        return;
56    }
57    if (reload){
58        location.reload();
59    }
60}
61
62function deleteCookie(name) {
63    document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
64}
65
66function cookieExists(name) {
67    return document.cookie.indexOf(name + "=") >=0;
68}
69
70function getCookie(name) {
71    const value = ";" + document.cookie;
72    const parts = value.split('; '+ name + '=');
73    if (parts.length === 2) {
74        return parts.pop().split(';').shift();
75    }
76}
77
78function hasPosition() {
79    const cookie = getCookie("user_position");
80    if (!cookie) {
81        return false;
82    }
83
84    const position = JSON.parse(decodeURIComponent(decodeURIComponent(cookie))).position;
85    return position !== null;
86}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.