PageSourceSearch

https://www.mortgagestrategy.co.uk/content/themes/moneymarketing2/js/mbm-scripts.js?ver=-1790808976

js mortgagestrategy.co.uk collected 2026-10-02 05:32:11 UTC 3,074 bytes, 92 lines download raw bytes

1jQuery(document).ready(function(){
2	window.jQuery = window.$ = jQuery;
3
4
5	function strpos (haystack, needle, offset) {
6	  	var i = (haystack+'').indexOf(needle, (offset || 0));
7	  	return i === -1 ? false : i;
8	}
9	setInterval(function(){
10		$('img.lazyloaded').each(function(){
11			this_img = $(this)
12			this_src = $(this_img).attr("src");
13			
14			if (strpos(this_src, "www.mortgagestrategy.co.uk") !== false ||
15				strpos(this_src, "www.moneymarketing.co.uk") !== false) {
16				if (strpos(this_src, "missing") === false) {
17					d = new Date();
18					this_data_src = $(this_img).attr("data-src");
19					this_data_srcset = $(this_img).attr("data-srcset");
20					this_srcset = $(this_img).attr("srcset");
21
22					new_data_src = this_data_src.replace('www.','cdn.');
23					new_data_srcset = this_data_srcset.replace('www.','cdn.');
24					new_srcset = this_srcset.replace('www.','cdn.');
25
26					new_src = this_src.replace('www.','cdn.');
27					new_src = new_src+"?replaced="+d.getTime();
28
29					$(this_img).attr("data-src",new_data_src);
30					$(this_img).attr("data-srcset",new_data_srcset);
31					$(this_img).attr("srcset",new_srcset);
32					$(this_img).attr("src",new_src);
33
34				}
35			}
36		});
37	},1000);
38
39	/** Start code to load popup using url #newsletter **/
40	/** guide to work this js :
41	  * ADD below Html to yeloni popup plugin 
42	  * <div class="subscription_popup subscription_popup_newsletter">[MBM_Form id="---formId---"]</div>
43	  * Please Note : html first div contain 'subscription_popup_newsletter' class
44	  * This is only work yeloni popup plugin 
45	 **/
46		if (location.hash.slice(1) == 'newsletter'){
47
48			var newsletter_popup = jQuery('.subscription_popup_newsletter').parent().parent().parent();
49			newsletter_popup.css('visibility','visible');
50			newsletter_popup.css('display','block');
51			
52		}
53	/** End code to load popup using url #newsletter **/
54});
55
56
57if(googletag){
58
59	// If the ad slot is an LB expandable, add class to iframe containing div
60	googletag.cmd.push(function () {
61		googletag.pubads().addEventListener('slotRenderEnded', function(event) {
62		    if (event.slot.getHtml().includes("dfp-expand")) {
63		        var expandEl = document.getElementById(event.slot.getSlotElementId());
64		        expandEl.className += " expandable"
65		    }
66		});
67	});
68
69	window.runNormalAdRefresh = true;
70
71	// This funcyionality runs once an ad slot comes into view, the it will refresh the ads in view after 60 seconds
72	googletag.cmd.push(function() {
73		googletag.pubads().addEventListener('impressionViewable', function (event) {
74			var slot = event.slot;
75
76			console.log("Ad slot " + slot.getSlotElementId() + " just came into view.");
77
78			setTimeout(function () {
79				if (window.runNormalAdRefresh) {
80					var now = new Date();
81
82					googletag.cmd.push(function() {
83						googletag.pubads().refresh([slot]);
84					});
85
86					console.log("Ad slot " + slot.getSlotElementId() + " refreshed at " + now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds());
87				}
88			}, 45000);
89		});
90	});
91
92}

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.