let _ads=[],platform="chrome",isFirefox="undefined"!==typeof InstallTrigger,isEdge=-1<navigator.userAgent.indexOf("Edg/")?!0:!1,isChrome=!!chrome&&(!!chrome.webstore||!!chrome.runtime),isOpera=0<=navigator.userAgent.indexOf(" OPR/");isChrome&&(platform="chrome");isFirefox&&(platform="firefox");isEdge&&(platform="edge");isOpera&&(platform="opera");let OS=window.navigator.userAgent.includes("Mac")?"mac":"windows";
const API_URL="https://shubads.testcasehub.net/",EXT_ID="6",newAPiUrl="https://selectorshub.info/nodeapp/api/",EXT_SLUG="TD";let countryName=null;if(Intl){let a=Intl.DateTimeFormat().resolvedOptions().timeZone.split("/");countryName=COUNTRIES[a[a.length-1]]}
function addingSkeletonLoading(a){if(a)for(a=0;3>a;a++)$(".all_feeds").append('<div class="row feed_strip loading-sk">\n\t\t<div class="col-2">\n\t\t\t<div class="thumbnail-loading skeleton"></div>\n\t\t</div>\n\t\t<div class="col-10 feed_icon">\n\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t<div class="post-body">\n\t\t\t\t<div class="row">\n\t\t\t\t\t<div class="col-6">\n\t\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-3"><div class="skeleton skeleton-text"></div></div>\n\t\t\t\t\t<div class="col-3">\n\t\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="row">\n\t\t\t\t<div class="col-9"><div class="skeleton skeleton-text"></div></div>\n\t\t\t</div>\n\t\t\t\n\t\t</div>\n  \t</div>');else $(".loading-sk").remove()}
function addingSkeletonLoadingForFullPost(a){a?$(".full-post").html('\t <div id="demo" class="carousel slide" data-ride="carousel">\n\t\t<div class="skeleton skeleton-modal-image"></div>\n\t  </div>\n\t\t<div class="col-12 feed_modal">\n\t\t\t<div class="row">\n\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t</div>\n\t\t\t<div class="row">\n\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t</div>\n\t\t\t<div class="row">\n\t\t\t\t<div class="col-6">\n\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class="col-3">\n\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t</div>\n\t\t\t\t<div class="col-3">\n\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>'):
$(".full-post").html("")}function parseDes(a){a=JSON.parse(a);let b=document.createElement("div");b.innerHTML=a;return b.innerText.substring(0,200)+"..."}function parseThumbnail(a,b,c){var d="../logo/top-logo.jpeg";if("all_post"==c||"single_post"==c)d="../assets/images/feed-def-image.png";return 2==b?a:d}
function showSinglePost(a){a=a[0];let b=parseDes(a.description),c="";null!=a.isvoted&&(c="votted");let d=a.vote_count,e=a.comment_count;var f="../assets/images/feed-def-image.png";let k='<button class="redirect-for-read">'+(null==a.external_label_link?"Read Article":a.external_label_link)+' <img src="../assets/images/view1.png" class="view1 read-full-aritcle"></button>';2==a.supplier_id?(f=a.image,k=`<button class="redirect-for-read youtube-watch-btn">Watch on youtube<img src="${faviConUrl(a.supplier_id,
a.display_author_logo)}" class="view1 read-full-aritcle"></button>`):3!=a.supplier_id&&(f=a.image);var h="",g="";let l="";null==f&&(g="dancing-class",f="../assets/images/white.png",l=`<img class="full-post-thumbnail ${g} black-theme-thumbnail" src="../assets/images/black.png">`,h=`<span class="two-ch-center">${JSON.parse(a.title).substring(0,2)}</span>`);let n=`https://www.facebook.com/sharer/sharer.php?display=page&u=${a.url}`,p=`https://twitter.com/share?text=${encodeURI(JSON.parse(a.title))}&url=${a.url}&via=TestingDaily`,
m=bookmarkImages[0];null!=a.isBookMark&&(m=bookmarkImages[1]);f=`${h}<img class="full-post-thumbnail ${g} white-theme-thumbnail" src="${f}">${l}`;2==a.supplier_id&&(f=`<iframe width="530" height="300"
	   src="https://www.youtube.com/embed/${a.url.split("?v=")[1]}">
	   </iframe>`);g=h="";$('.poll-post[data-post-id="'+a.id+'"]').length&&(f="",h='<div class="row  flex-column poll-options ">'+$('.poll-post[data-post-id="'+a.id+'"]').find(".poll-options").html()+"</div>",g=parseInt($('.poll-post[data-post-id="'+a.id+'"]').attr("data-total-votes")));$(".full-post").html(`<div  id="demo" class="carousel slide " data-ride="carousel">
	<div class="carousel-inner">
	  <div class="carousel-item active">
		${f}
		<div class="carousel-caption">
		</div>   
	  </div>
	</div>
	
  </div>
	<div data-post-id ="${a.id}" data-total-votes="${g}" class="col-12 feed_modal post">
	 <p class="tooltip-r" data-toggle="tooltip" data-placement="bottom" title="${JSON.parse(a.title)}">${JSON.parse(a.title)}</p>
	 ${h}
	 <img class="sup-favicon" src="${faviConUrl(a.supplier_id,a.display_author_logo)}">
	 <span class="post-date-time">${displayDate(a.pubdate)}</span>
	 <span class="post-author"><img src="${authorFaviConUrl(a.display_author_logo,a.author_logo)}" class="author-image">${null==a.display_author_name?JSON.parse(a.author_name):a.display_author_name}</span><br>
	 <p class="feed_p">${b}</p>
	
	 <div class="row">
	   <a href="${a.url}" target="_blank">
			${k}
	 </a>
	 </div>
	

		<span class="pills upvote vote-btn ${c}">
			<img class="down-vote" src="../assets/images/up-vote.png">
			<img  class="up-vote" src="../assets/images/upvoted-r.png">
			<span class="counter">${d}</span>
		</span>
		<span class="pills commented" id="msg_icon">
			<img class="comment-default" src="../assets/images/msg_icon.png">
			<img class="blue-comment" src="../assets/images/blue-message.png">
			<span class="counter1">${e}</span>
		</span>

		<span class="pills bookmark-btn" id="msg_icon">
			${m}
		</span>

	   <span class="pills open-share-options" id="share_icon"><img src="../assets/images/share_icon.png"></span>
	
	 <ul class="social_icons">
	 <h6 style="font-weight: 400;font-size: 18px;line-height: 24px;color: #4D4D4D;margin-top:8px">Share Article</h6>

	  <img data-copy-url="${a.url}" class="social-img copy-post-url" src="../assets/images/copy.png"></img>
	  <a href="whatsapp://send?text=The text to share!" data-action="share/whatsapp/share">
	  	<img class="social-img" src="../assets/images/whatsapp.png"></img>
	  </a>
		<a href="${n}" target="_blank"><img class="social-img" src="../assets/images/facebook.png"></img></a>
		<a href="${p}" target="_blank"><img class="social-img" src="../assets/images/twitter.png"></img></a>
	  
	 </ul>
	  <div class="form-group">
		<label for="comment"></label>
		<textarea class="form-control new-comment-text" rows="3" id="comment" placeholder="Type here"></textarea>
	  </div> 
	  <div class="col-12 post_comment">
	  		<button class="btn btn-primary save-new-comment" disabled="true">Post Comment</button>
	  </div>

	<div class="all-comments">
		
	</div>

	</div>`)}function showComments(a,b,c){let d="";a.comments.forEach(f=>{let k="";f.replies.forEach(g=>{let l='<div class="comment-action"><span class="comment-del comment-action-btns">Delete</span> <span class="edit-comment comment-action-btns">Edit</span></div>';b!=g.user.id&&(l="");k+=`<div class="row comment__replies comment_counts">
			<div data-parent-id="${f.id}" data-user-id="${g.user.id}" data-comment-id="${g.id}" data-post-id="${g.id}" class="row comment_section">
			<div class="row replies-comments-text">
				<div class="col-2 p-0">
				<img src="https://backend.testingdaily.info/uploads/profile-images/${g.user.image}">
				</div>
				<div class="col-10 p-0" style="position: relative;left: -16px;">
				<h6 class="name">${g.user.name}</h6>
				<h6 class="time">${displayDate(g.created_at)}</h6>
				<p class="comment">${JSON.parse(g.text)}</p>
				${l}
				</div>
			</div>
			

		</div>						
			
			</div>`});let h='<div class="comment-action"><span class="comment-del comment-action-btns">Delete</span> <span class="edit-comment comment-action-btns">Edit</span></div>';c||b!=f.user.id&&(h="");d+=`<div data-user-id="${f.user.id}" data-comment-id="${f.id}" data-post-id="${a.id}" class="row comment_section comment_counts">
								<div class="row">
									<div class="col-2 p-0">
									<img src="https://backend.testingdaily.info/uploads/profile-images/${f.user.image}">
									</div>
									<div class="col-10 p-0" style="position: relative;left: -16px;">
									<h6 class="name">${f.user.name}</h6>
									<h6 class="time">${displayDate(f.created_at)}</h6>
									<p class="comment">${urlify(JSON.parse(f.text))}</p>
									${h}
									</div>
								</div>
								${k}

							</div>`});var e=setInterval(()=>{$(".all-comments").length&&(clearInterval(e),$(".all-comments").append(d),$(".single-post-comment-count").html($(".comment_counts").length))},200)}function urlify(a){return a.replace(/(https?:\/\/[^\s]+)/g,function(b){return'<a href="'+b+'">'+b+"</a>"})}function displayDate(a){return moment(new Date(a)).format("MMM DD, YYYY")}function addNewAddedComment(a){var b=a.comment;b=`<div data-user-id="${a.user_id}" data-comment-id="${b.id}" data-post-id="${b.post_id}" class="row comment_section">
						<div class="row">
							<div class="col-2 p-0">
							<img src="${a.image}">
							</div>
							<div class="col-10 p-0" style="position: relative;left: -16px;">
							<h6 class="name">${a.name}</h6>
							<h6 class="time">${displayDate(b.created_at)}</h6>
							<p class="comment">${urlify(JSON.parse(b.text))}</p>
							<div class="comment-action"><span class="comment-del comment-action-btns">Delete</span></div>
							</div>
						</div>
					</div>`;$(".all-comments").prepend(b);pn(a.message,"success")}function pn(a="Something went wrong!",b="error"){(new Noty({type:b,layout:"topRight",theme:"sunset",timeout:6E3,closeWith:["click","button"],text:a})).show()}
function deleteComment(a){pn("Sending request...","warning");chrome.storage.local.get(["login"],function(b){$.ajax({method:"GET",url:endpoint+"deletecomment?comment_id="+a,headers:{Authorization:"Bearer "+b.login},success:function(c,d,e){1==c.status&&($('.row.comment_section[data-comment-id="'+c.id+'"]').remove(),pn(c.message,"success"))},statusCode:{500:function(c){},401:function(){},422:function(c){}}})})}
function addingSkeletonLoadingForPromotedPost(a){a?$(".promoted-section").append('<div class="col-2 skpp">\n\t\t\t\t\t<div class="skeleton skeleton-promote-image"></div>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t\t<div class="col-10 skpp">\n\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t\t<div class="skeleton skeleton-text skeleton-text-12"></div>\n\t\t\t\t\n\t\t\t\t</div>'):$(".skpp").remove()}
function getPromotedPost(){addingSkeletonLoadingForPromotedPost(!0);$.ajax({method:"GET",url:endpoint+"getpromotedpost",success:function(a,b,c){addingSkeletonLoadingForPromotedPost(!1);1==a.status&&(a=`<div class="col-2 change-wcol">
				<a target="_blank" href="${a.promoted_post.redirect_url}"><img src="${a.promoted_post.image}"></img></a>
			</div>
			<div class="col-10">
				<h3><a id="promoted-redirect-link" target="_blank" href="${a.promoted_post.redirect_url}"><p>${a.promoted_post.text}</p></a></h3>
				<button class="promoted-btn">Promoted</button>
			</div>`,$(".promoted-section").html(a))},statusCode:{500:function(a){},401:function(){},422:function(a){}}})}
function skeletonloadingformightlike(){$(".might-like-section").html("");for(let a=0;4>a;a++)$(".might-like-section").append('<div class="row">\n\n\t\t<div class="col-5"><div class="skeleton skeleton-text mlp-image" style="\n\t\theight: 60px;\n\t\twidth: 100%;\n\t"></div></div>\n\t\t<div class="col-7">\n\t<div class="skeleton skeleton-text"></div>\n\t<div class="skeleton skeleton-text"></div>\n\t</div>\n\t\n\t</div>')}
function displayMightLikePost(a){$(".might-like-section").html("");a.forEach(b=>{let c;c=1==b.supplier_id?parseThumbnail(b.description,b.supplier_id,"might_like"):2==b.supplier_id?parseThumbnail(b.image,b.supplier_id,"might_like"):3==b.supplier_id?"../assets/images/feed-def-image.png":b.image;b=`<div data-post-id ="${b.id}" class="row read-all post">
				<div class="col-5">
				<img class="open-post" src="${c}">
				</div>
				<div class="col-7 img_p">
					<p>${JSON.parse(b.title).substring(0,25)+"..."}</p>
					<img class="sup-favicon" src="${faviConUrl(b.supplier_id,b.display_author_logo)}">
					<span class="post-date-time">${displayDate(b.pubdate)}</span><br>
					<div class="row counter_sec">
					<span>${b.vote_count} Upvotes</span><span> ${b.comment_count} Comments</span>
					</div>
				</div>
			</div>`;$(".might-like-section").append(b)});setTimeout(()=>{imloaderros()},500)}function imloaderros(){var a=document.querySelectorAll(".might-like-section img.open-post");null!=a&&void 0!==a&&a.forEach(b=>{b.addEventListener("error",function(c){c.target.src="../logo/top-logo.jpeg";c.onerror=null})})}
function imloaderros2(){var a=document.querySelectorAll(".all_feeds img.open-post");null!=a&&void 0!==a&&a.forEach(b=>{b.addEventListener("error",function(c){c.target.src="../assets/images/feed-def-image.png";c.onerror=null})})}
function updateSupplierStatus(a,b){chrome.storage.local.get(["login"],function(c){if(void 0!==c.login&&c.login&&""!=c.login)pn("Sending request","warning"),$.ajax({method:"GET",url:endpoint+"updateSupplierStatus?id="+b,headers:{Authorization:"Bearer "+c.login},success:function(d,e,f){1==d.status&&(pn(d.message,"success"),0==d.newstatus?($('div.post[data-supplier-id="'+d.id+'"]').remove(),4>$("div.post[data-supplier-id]").length&&getFeed()):$('div.post[data-supplier-id="'+d.id+'"]').show(),chrome.runtime.sendMessage({prefeed:!0}))},
statusCode:{500:function(d){},401:function(){},422:function(d){}}});else return pn("Please login for customization.","error"),$(".supplier-status").prop("checked",!0),$("button.close").click(),$(".login-link").click(),!1})}function getSupplierList(){chrome.storage.local.get(["login"],function(a){$.ajax({method:"GET",url:endpoint+"getSuppliers",headers:{Authorization:"Bearer "+a.login},success:function(b,c,d){1==b.status&&($(".supplier-list").html(""),b.suppliers.forEach(e=>{$(".supplier-list").append(`<div class="row supplier-rows" data-supplier-id="${e.id}">
													<div class="supplier-name">${e.name}</div>
													<div class="supllier-status">
														<label class="switch">
															<input class="supplier-status" type="checkbox" checked>
															<span class="slider2 round">
																
															</span>
														</label>
													</div>
												</div>`)}),b.offsuppliers.forEach(e=>{$('div.supplier-rows[data-supplier-id="'+e.supplier_id+'"] input').prop("checked",!1)}))},statusCode:{500:function(b){},401:function(){},422:function(b){}}})})}function trackEvent(a){"string"!==typeof a&&fetch(`${API_URL}analytics/ads/track`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}
let adsViewerPrevBtn=document.querySelector(".navigate-prev-btn"),adsViewerNextBtn=document.querySelector(".navigate-next-btn"),currentIndex=1,tIntervals=[],tInterval=null,tStartTime=0,tTimeRest=0,tIsPaused=!1;
const applyInterval=a=>{const b=document.querySelectorAll(".promoted-item");tIntervals.forEach(c=>clearInterval(c));tIntervals=[];tInterval=setInterval(()=>{if(b[currentIndex]){tStartTime=Date.now();b.forEach((d,e)=>{e===currentIndex?d.classList.remove("hideElement"):d.classList.add("hideElement")});let c=setTimeout(()=>{clearTimeout(c);clearInterval(tInterval);tStartTime=0;const d=b[currentIndex].id.replace("ad__",""),e=_ads.filter(f=>f.id==d)[0];currentIndex===b.length-1?currentIndex=0:currentIndex++;
tStartTime=Date.now();applyInterval(1E3*e.display_time)},300)}},a);tIntervals.push(tInterval)};adsViewerPrevBtn.addEventListener("click",()=>{let a=document.querySelectorAll(".promoted-item");currentIndex-=2;0>currentIndex&&(currentIndex=a.length+currentIndex);applyInterval(400,"prev")});adsViewerNextBtn.addEventListener("click",()=>{applyInterval(400,"next")});
const displayAds=a=>{clearInterval(tInterval);tStartTime=0;_ads=a;let b=document.querySelector("#promoted-container");b.innerHTML="";a.forEach((c,d)=>{const e=document.createElement("div");e.id="ad__"+c.id;e.classList.add("promoted-item");0!==d&&e.classList.add("hideElement");e.setAttribute("data-display-time",c.display_time);e.innerHTML=`
				<div class="col-2 change-wcol">
					<a target="_blank" href="${c.link}"><img src="${c.image_url}"></img></a>
				</div>
				<div class="col-10">
					<h3><a id="promoted-redirect-link" target="_blank" href="${c.link}"><p>${c.ad}</p></a></h3>
					<div class="promoted-btns">
						
						${c.type?`<span class="type-btns-1" style="background-color:${c.type.color};">${c.type.name}</span>`:'<button class="promoted-btn">Promoted</button>'}
						${c.action?`<a target="_blank" href="${c.link}" class="promoted-custom-btn" style="color: ${c.action.text_color}; background-color: ${c.action.background_color}">
							${c.action.name}
							<span ><img src="${c.action.icon_url}" /></span>
						</a>`:""}
					</div>
				</div>`;e.addEventListener("click",async()=>{trackClicks({ext_slug:EXT_SLUG,add_id:c.id,type:"footer"})});b.appendChild(e)})};addingSkeletonLoadingForPromotedPost(!0);
chrome.storage.local.get(["ads"],async function(a){if(void 0!=a.ads){a=a.ads;displayAds(a.ads);currentIndex=1;tStartTime=Date.now();const b=document.querySelectorAll(".promoted-item");applyInterval(1E3*a.ads[0].display_time);b.forEach(c=>{c.addEventListener("mouseenter",()=>{tIsPaused||(clearInterval(tInterval),tTimeRest=Date.now()-tStartTime,tIsPaused=!0)});c.addEventListener("mouseleave",()=>{if(tIsPaused){var d=c.getAttribute("data-display-time");if(d=parseInt(d))tStartTime=Date.now()-tTimeRest,
applyInterval(1E3*d-tTimeRest),tIsPaused=!1}})});updateAdsInStorage=!0}});var updateAdsInStorage=!1;
const displayAllAds=async a=>{if(a.active){for(var b in a){let c=a[b];Array.isArray(a[b])&&(a[b]=c.filter(d=>d.excluded_countries?!d.excluded_countries.includes(countryName):!0))}0<a.ext__ads.length?(chrome.storage.local.set({ads:{ads:a.ext__ads}}),displayAds(a.ext__ads),currentIndex=1,tStartTime=Date.now(),b=document.querySelectorAll(".promoted-item"),applyInterval(1E3*a.ext__ads[0].display_time),b.forEach(c=>{c.addEventListener("mouseenter",()=>{tIsPaused||(clearInterval(tInterval),tTimeRest=Date.now()-
tStartTime,tIsPaused=!0)});c.addEventListener("mouseleave",()=>{if(tIsPaused){var d=c.getAttribute("data-display-time");if(d=parseInt(d))tStartTime=Date.now()-tTimeRest,applyInterval(1E3*d-tTimeRest),tIsPaused=!1}})})):getPromotedPost();0<a.links__ads.length&&(a=a.links__ads.filter(c=>"on__uninstall"===c.type),chrome.runtime.setUninstallURL(0<a.length?a[0].link:"https://selectorshub.com/testcase-studio/uninstall-tcs/"))}};
chrome.storage.local.get(["ext_uniq_id","fetched_ads"],a=>{let b=Date.now();!a.fetched_ads||0<b-a.fetched_ads.timestamp?fetch(`${newAPiUrl}all-ads`,{cache:"no-store"}).then(c=>c.json()).then(async c=>{chrome.storage.local.set({fetched_ads:{timestamp:Date.now(),data:c}});displayAllAds2(c)}):displayAllAds2(a.fetched_ads.data)});
function displayMightLikeEvent(a){$(".might-like-section").html("");a.forEach(b=>{let c;c=1==b.supplier_id?parseThumbnail(b.description,b.supplier_id,"might_like"):2==b.supplier_id?parseThumbnail(b.image,b.supplier_id,"might_like"):3==b.supplier_id?"../assets/images/feed-def-image.png":b.image;null==c&&(c="../logo/top-logo.jpeg");b=`<div data-post-id ="${b.id}" class="row read-all post event-item">
				<div class="col-5">
				<img class="open-post" src="${c}">
				</div>
				<div class="col-7 img_p">
					<p>${JSON.parse(b.title).substring(0,25)+"..."}</p>
					<img class="sup-favicon" src="${faviConUrl(b.supplier_id,b.display_author_logo)}">
					<span class="post-date-time">${displayDate(b.end_date)}</span><br>
					
				</div>
			</div>`;$(".might-like-section").append(b)});setTimeout(()=>{imloaderros()},500)}
function addingSkeletonLoadingForJobListing(a){if(a)for(a=0;3>a;a++)$(".all_jobs").append('<div class="row feed_strip loading-sk">\n\t\t\t<div class="col-2">\n\t\t\t\t<div class="thumbnail-loading skeleton"></div>\n\t\t\t</div>\n\t\t\t<div class="col-10 feed_icon">\n\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t<div class="post-body">\n\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t<div class="col-6">\n\t\t\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-3"><div class="skeleton skeleton-text"></div></div>\n\t\t\t\t\t\t<div class="col-3">\n\t\t\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t\t\t\t<div class="skeleton skeleton-text"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row">\n\t\t\t\t\t<div class="col-9"><div class="skeleton skeleton-text"></div></div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t</div>\n\t\t  </div>');else $(".all_jobs .loading-sk").remove()}
function displayMightLikeJob(a){$(".might-like-section").html("");a.forEach(b=>{let c=b.company_logo;null==c&&(c="../logo/top-logo.jpeg");b=`<div data-post-id ="${b.id}" class="row read-all job job-item">
					<div class="col-5 text-center">
					<img class="open-job company-logo-like" src="${c}">
					</div>
					<div class="col-7 img_p">
						<p>${JSON.parse(b.title).substring(0,25)+"..."}</p>
						<img class="sup-favicon" src="${faviConUrl(b.supplier_id,b.display_author_logo)}">
						<span class="post-date-time">${displayDate(b.end_date)}</span><br>
					</div>
				</div>`;$(".might-like-section").append(b)});setTimeout(()=>{imloaderros()},500)}function showTab(a="home"){console.log(a);$('.sup-filter[class$="-inactive"]').show();$('.sup-filter[class$="-active"]').hide();$(".sup-filter."+a+"-active").show();$(".sup-filter."+a+"-inactive").hide();$(".filter-parent").removeClass("active-filter");$(".sup-filter."+a+"-active").parent().addClass("active-filter")}
const displayAllAds2=async a=>{if(a.status)if(0<a.footer_ads.length){console.log(a.footer_ads);console.log(EXT_SLUG);console.log(platform);a=a.footer_ads.filter(c=>c.extensions.includes(EXT_SLUG)&&c.browsers.map(d=>d.toLowerCase()).includes(platform.toLowerCase()));console.log(a);chrome.storage.local.set({ads:{ads:a}});displayAds(a);currentIndex=1;tStartTime=Date.now();const b=document.querySelectorAll(".promoted-item");applyInterval(1E3*a[0].display_time);b.forEach(c=>{c.addEventListener("mouseenter",
()=>{tIsPaused||(clearInterval(tInterval),tTimeRest=Date.now()-tStartTime,tIsPaused=!0)});c.addEventListener("mouseleave",()=>{if(tIsPaused){var d=c.getAttribute("data-display-time");if(d=parseInt(d))tStartTime=Date.now()-tTimeRest,applyInterval(1E3*d-tTimeRest),tIsPaused=!1}})})}else getPromotedPost()};
function trackClicks(a){const b=(new URLSearchParams({ext_slug:a.ext_slug,add_id:a.add_id,type:a.type})).toString();chrome.storage.local.get(["trackedQueries"],c=>{c=c.trackedQueries||[];c.includes(b)||(c.unshift(b),5<c.length&&(c=c.slice(0,5)),chrome.storage.local.set({trackedQueries:c},()=>{fetch(`${newAPiUrl}link/track?${b}`)}))})};
