Commercial Demolition, Maroochydore
Additional details:
Add additional details here or just delete all content.
*/}).toString().match(regex); /*-->*/ var headerAssets = matches[1]; function getElementAttrs(el, new_el) { Array.prototype.slice.call(el.attributes).forEach(function(item) { new_el.setAttribute(item.name, item.value); }); } function appendElementToHead(element) { var tagname = element.tagName; var e = document.createElement(tagname); e.innerHTML = element.innerHTML; getElementAttrs(element, e); if(e.nodeName == 'LINK') { // temporarily, set media to something non-matching to ensure it'll // fetch without blocking render e.media = 'only x'; } document.head.appendChild(e); setTimeout( function(){ // set media back to `all` so that the stylesheet applies once it loads e.media = 'all'; },0); } function downloadCSSAtOnLoad() { for (var i = 0; i < cssArray.length; i++) { // Create element as a new node and append to body asset = cssArray[i]; div = document.createElement('div'); div.innerHTML = asset; element = div.firstChild; appendElementToHead(element); } } var cssArray = []; var headerAssetsArray = headerAssets.split("\n"); var asset = ''; var div = ''; var element = ''; var index = 0; for (var i = 0; i < headerAssetsArray.length; i++) { asset = headerAssetsArray[i]; asset = asset.trim(); if(asset === '') { continue; } // Create element and place asset inside div = document.createElement('div'); div.innerHTML = asset; // Check if a stylesheet and load at OnLoad element = div.getElementsByTagName('link')[0]; if(element && element !== 'undefined') { cssArray[index++] = asset; continue; } // Create element as a new node and append to body element = div.firstChild; appendElementToHead(element); } if (window.addEventListener) { window.addEventListener("load", downloadCSSAtOnLoad, false); } else if (window.attachEvent) { window.attachEvent("onload", downloadCSSAtOnLoad); } else { window.onload = downloadCSSAtOnLoad; } // Set a fake jquery object that will load any $ and jQuery functions into an array while the jQuery library is loading var delayedjQuery = []; jQuery = function() { if (typeof arguments[0] === 'function') { jQuery(document).ready(arguments[0]); } else { return { ready: function(fn) { delayedjQuery.push(fn); } } } }; $ = jQuery; // Load the delayed jQuery functions only after the jQuery library has been loaded var waitForjQueryLoad = setInterval(function() { if (typeof jQuery.fn !== 'undefined') { var loadedJquery = []; for (k in delayedjQuery) { try { delayedjQuery[k](); } catch(e) { // Reset the ticker and library variables var ticker = ''; var library = ''; // Convert the function into a string var func = delayedjQuery[k].toString(); // Get the body of the function (i.e. without function() { }) var body = func.substring(func.indexOf("{") + 1, func.lastIndexOf("}")); switch(true) { case /\.ckeditor(?=\()/.test(body): library = '.ckeditor'; ticker = 'var tickerjQuery' + k + ' = setInterval(function() { if(typeof CKEDITOR !== "undefined" && typeof typeof $.fn.ckeditor !== "undefined") { ' + body + '; clearInterval(tickerjQuery' + k + '); }}, 200);' if(loadedJquery.indexOf(library) < 0) { loadedJquery.push(library); eval(ticker); } break; case /\.datepicker(?=\()/.test(body): library = '.datepicker'; ticker = 'var tickerjQuery' + k + ' = setInterval(function() { if(typeof typeof $.fn.datepicker !== "undefined") { ' + body + '; clearInterval(tickerjQuery'+k+'); }}, 200);' if(loadedJquery.indexOf(library) < 0) { loadedJquery.push(library); eval(ticker); } break; case /\.concreteFileSelector(?=\()/.test(body): library = '.concreteFileSelector'; // phpcs:ignore ticker = 'var tickerjQuery'+k+' = setInterval(function() { if(typeof $.fn.concreteFileSelector !== "undefined" && typeof ccmi18n_filemanager !== "undefined") { ' + body + '; clearInterval(tickerjQuery' + k + '); }}, 200);' if(loadedJquery.indexOf(library) < 0) { loadedJquery.push(library); eval(ticker); } break; case /\.selectize(?=\()/.test(body): library = '.selectize'; ticker = 'var tickerjQuery' + k + ' = setInterval(function() { if(typeof $.fn.selectize !== "undefined" && typeof ccmi18n_tourist !== "undefined") { ' + body + '; clearInterval(tickerjQuery' + k + '); }}, 200);' if(loadedJquery.indexOf(library) < 0) { loadedJquery.push(library); eval(ticker); } break; default: // Set the regexp to check what type of jQuery function is being used, e.g. concreteFileManager, unveil, awesomeStarRating etc etc var matches = body.match(/\.([a-zA-Z0-9_]+)(?=\()/g); // Run throuhg all the matches and for each match, add the jQuery library to ticker interval so it loads it before running the script // There might be more than one library in the body so matches will have multiple elements. for(i in matches) { library = matches[i]; if(loadedJquery.indexOf(library) >= 0) { continue } else { loadedJquery.push(library); } ticker += 'typeof $.fn' + library + ' !== "undefined"'; if(i < matches.length - 1) { ticker += ' && '; } } if(ticker != '') { ticker = 'var tickerjQuery' + k + ' = setInterval(function() { if(' + ticker + '){ ' + body + '; clearInterval(tickerjQuery' + k + '); }}, 200);'; eval(ticker); } break; } } } clearInterval(waitForjQueryLoad); } }, 500);
Additional details:
Add additional details here or just delete all content.