PageSourceSearch

https://www.wesfarmers.com.au/ResourcePackages/Wesfarmers/assets/dist/js/vex.custom.terms-conditions.js

js wesfarmers.com.au collected 2026-10-02 07:19:12 UTC 2,195 bytes, 76 lines download raw bytes

1var vexModal = { 
2
3	init: function() { 
4		
5		var tncPage = '/investor-centre/debt-investors/terms-and-conditions'; 
6		var redirectTo = '/investor-centre';
7
8		function setCookie(key, value) { 
9			var exp = isIE() ? setExpire() : 'null';
10		    document.cookie = encodeURIComponent(key) + "=" + encodeURIComponent(value) + ";expires="+ exp +";path=/";
11		}
12
13		function getCookie(key) {
14			var nameEQ = encodeURIComponent(key) + "=";
15		    var ca = document.cookie.split(';');
16		    for (var i = 0; i < ca.length; i++) {
17		        var c = ca[i];
18		        while (c.charAt(0) === ' ') c = c.substring(1, c.length);
19		        if (c.indexOf(nameEQ) === 0) return decodeURIComponent(c.substring(nameEQ.length, c.length));
20		    }
21		    return null;
22		}
23
24		function eraseCookie(key) {
25		    document.cookie = encodeURIComponent(key) + "='';expires=-1";
26		}
27
28		function goTo(url) {
29			window.location.href = url;
30		} 
31
32		function callbackHandler(data) {
33			if (data === false) 
34				goTo(redirectTo);
35			else
36				setCookie('tncAccepted', 'accepted');
37			
38		} 
39
40		function isIE() {  
41			var ua = window.navigator.userAgent; 
42			var msie = ua.indexOf('MSIE '); 
43			var trident = ua.indexOf('Trident/');
44			var edge = ua.indexOf('Edge/'); 
45
46			return ((msie > 0 ) || (trident > 0) || (edge > 0)) ? true : false;
47		} 
48
49		function setExpire() {
50			var date = new Date(); 
51			date = date.getTime()+(10*60*1000);
52			return new Date(date).toUTCString();
53		}
54
55		var iFrame = $('<div id="vexContentBody" class="vex-content__body"> ' +
56                       	'<iframe width="100%" height="500" scrolling="auto" frameborder="no" ' +
57                       	'src="' + tncPage +'"> ' +
58                       	'</iframe></div>');
59
60		vex.defaultOptions.className = 'vex-theme-wireframe';
61		vex.dialog.buttons.YES.text = 'I agree';
62
63		if (!(getCookie('tncAccepted') === 'accepted')) { 
64
65			vex.dialog.confirm({ 
66			  message: iFrame, 
67			  showCloseButton: false, 
68			  escapeButtonCloses: false, 
69			  className: 'vex-theme-wireframe', 
70			  callback: callbackHandler
71			});	
72		}
73      	
74	} //end: init()
75} // end: vexModal 
76$(vexModal.init());

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.