D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
sadaunjx
/
forsa2you.com
/
wp-content
/
plugins
/
ad-inserter
/
includes
/
js
/
Filename :
ai-insert.q.min.js
back
Copy
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var f=0;return function(){return f<a.length?{done:!1,value:a[f++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var f="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return f?f.call(a):$jscomp.arrayIterator(a)}; ai_insert=function(a,f,n){for(var k=-1!=f.indexOf(":eq")?jQuery(f):document.querySelectorAll(f),u=0,y=k.length;u<y;u++){var c=k[u];selector_string=c.hasAttribute("id")?"#"+c.getAttribute("id"):c.hasAttribute("class")?"."+c.getAttribute("class").replace(RegExp(" ","g"),"."):"";var v=document.createElement("div");v.innerHTML=n;var p=v.getElementsByClassName("ai-selector-counter")[0];null!=p&&(p.innerText=u+1);p=v.getElementsByClassName("ai-debug-name ai-main")[0];if(null!=p){var m="";"undefined"!=typeof ai_front&& ("before"==a?m=ai_front.insertion_before:"after"==a?m=ai_front.insertion_after:"prepend"==a?m=ai_front.insertion_prepend:"append"==a?m=ai_front.insertion_append:"replace-content"==a?m=ai_front.insertion_replace_content:"replace-element"==a&&(m=ai_front.insertion_replace_element));-1==selector_string.indexOf(".ai-viewports")&&(p.innerText=m+" "+f+" ("+c.tagName.toLowerCase()+selector_string+")")}p=document.createRange();m=!0;try{var w=p.createContextualFragment(v.innerHTML)}catch(t){m=!1}"before"== a?m?c.parentNode.insertBefore(w,c):jQuery(v.innerHTML).insertBefore(jQuery(c)):"after"==a?m?c.parentNode.insertBefore(w,c.nextSibling):jQuery(v.innerHTML).insertBefore(jQuery(c.nextSibling)):"prepend"==a?m?c.insertBefore(w,c.firstChild):jQuery(v.innerHTML).insertBefore(jQuery(c.firstChild)):"append"==a?m?c.insertBefore(w,null):jQuery(v.innerHTML).appendTo(jQuery(c)):"replace-content"==a?(c.innerHTML="",m?c.insertBefore(w,null):jQuery(v.innerHTML).appendTo(jQuery(c))):"replace-element"==a&&(m?c.parentNode.insertBefore(w, c):jQuery(v.innerHTML).insertBefore(jQuery(c)),c.parentNode.removeChild(c))}}; ai_insert_code=function(a){function f(p,m){return null==p?!1:p.classList?p.classList.contains(m):-1<(" "+p.className+" ").indexOf(" "+m+" ")}function n(p,m){null!=p&&(p.classList?p.classList.add(m):p.className+=" "+m)}function k(p,m){null!=p&&(p.classList?p.classList.remove(m):p.className=p.className.replace(new RegExp("(^|\\b)"+m.split(" ").join("|")+"(\\b|$)","gi")," "))}if("undefined"!=typeof a){var u=!1;if(f(a,"no-visibility-check")||a.offsetWidth||a.offsetHeight||a.getClientRects().length){u= a.getAttribute("data-code");var y=a.getAttribute("data-insertion-position"),c=a.getAttribute("data-selector");if(null!=u)if(null!=y&&null!=c){if(-1!=c.indexOf(":eq")?jQuery(c).length:document.querySelectorAll(c).length)ai_insert(y,c,b64d(u)),k(a,"ai-viewports")}else{y=document.createRange();c=!0;try{var v=y.createContextualFragment(b64d(u))}catch(p){c=!1}c?a.parentNode.insertBefore(v,a.nextSibling):jQuery(b64d(u)).insertBefore(jQuery(a.nextSibling));k(a,"ai-viewports")}u=!0}else v=a.previousElementSibling, f(v,"ai-debug-bar")&&f(v,"ai-debug-script")&&(k(v,"ai-debug-script"),n(v,"ai-debug-viewport-invisible")),k(a,"ai-viewports");return u}}; ai_insert_list_code=function(a){var f=document.getElementsByClassName(a)[0];if("undefined"!=typeof f){var n=ai_insert_code(f),k=f.closest("div."+ai_block_class_def);if(k){n||k.removeAttribute("data-ai");var u=k.querySelectorAll(".ai-debug-block");k&&u.length&&(k.classList.remove("ai-list-block"),k.classList.remove("ai-list-block-ip"),k.classList.remove("ai-list-block-filter"),k.style.visibility="",k.classList.contains("ai-remove-position")&&(k.style.position=""))}f.classList.remove(a);n&&ai_process_elements()}}; ai_insert_viewport_code=function(a){var f=document.getElementsByClassName(a)[0];if("undefined"!=typeof f){var n=ai_insert_code(f);f.classList.remove(a);n&&(a=f.closest("div."+ai_block_class_def),null!=a&&(n=f.getAttribute("style"),null!=n&&a.setAttribute("style",a.getAttribute("style")+" "+n)));setTimeout(function(){f.removeAttribute("style")},2);ai_process_elements()}}; ai_insert_adsense_fallback_codes=function(a){a.style.display="none";var f=a.closest(".ai-fallback-adsense"),n=f.nextElementSibling;n.getAttribute("data-code")?ai_insert_code(n)&&ai_process_elements():n.style.display="block";f.classList.contains("ai-empty-code")&&(a=a.closest("."+ai_block_class_def).getElementsByClassName("code-block-label"),0!=a.length&&(a[0].style.display="none"))}; ai_insert_code_by_class=function(a){var f=document.getElementsByClassName(a)[0];"undefined"!=typeof f&&(ai_insert_code(f),f.classList.remove(a))};ai_insert_client_code=function(a,f){var n=document.getElementsByClassName(a)[0];if("undefined"!=typeof n){var k=n.getAttribute("data-code");null!=k&&ai_check_block()&&ai_check_and_insert_block()&&(n.setAttribute("data-code",k.substring(Math.floor(f/19))),ai_insert_code_by_class(a),n.remove())}};ai_process_elements_active=!1; function ai_process_elements(){ai_process_elements_active||setTimeout(function(){ai_process_elements_active=!1;"function"==typeof ai_process_rotations&&ai_process_rotations();"function"==typeof ai_process_lists&&ai_process_lists(jQuery(".ai-list-data"));"function"==typeof ai_process_ip_addresses&&ai_process_ip_addresses(jQuery(".ai-ip-data"));"function"==typeof ai_process_filter_hooks&&ai_process_filter_hooks(jQuery(".ai-filter-check"));"function"==typeof ai_adb_process_blocks&&ai_adb_process_blocks(); "function"==typeof ai_process_impressions&&1==ai_tracking_finished&&ai_process_impressions();"function"==typeof ai_install_click_trackers&&1==ai_tracking_finished&&ai_install_click_trackers();"function"==typeof ai_install_close_buttons&&ai_install_close_buttons(document)},5);ai_process_elements_active=!0} var targetNode=document.querySelector("body"),config={attributes:!0,childList:!1,subtree:!0},ai_adsense_callback=function(a,f){for(var n=$jscomp.makeIterator(a),k=n.next();!k.done;k=n.next())k=k.value,"attributes"===k.type&&"data-ad-status"==k.attributeName&&"unfilled"==k.target.dataset.adStatus&&k.target.closest(".ai-fallback-adsense")&&ai_insert_adsense_fallback_codes(k.target)},observer=new MutationObserver(ai_adsense_callback);observer.observe(targetNode,config); var Arrive=function(a,f,n){function k(t,d,e){c.addMethod(d,e,t.unbindEvent);c.addMethod(d,e,t.unbindEventWithSelectorOrCallback);c.addMethod(d,e,t.unbindEventWithSelectorAndCallback)}function u(t){t.arrive=m.bindEvent;k(m,t,"unbindArrive");t.leave=w.bindEvent;k(w,t,"unbindLeave")}if(a.MutationObserver&&"undefined"!==typeof HTMLElement){var y=0,c=function(){var t=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector; return{matchesSelector:function(d,e){return d instanceof HTMLElement&&t.call(d,e)},addMethod:function(d,e,g){var b=d[e];d[e]=function(){if(g.length==arguments.length)return g.apply(this,arguments);if("function"==typeof b)return b.apply(this,arguments)}},callCallbacks:function(d,e){e&&e.options.onceOnly&&1==e.firedElems.length&&(d=[d[0]]);for(var g=0,b;b=d[g];g++)b&&b.callback&&b.callback.call(b.elem,b.elem);e&&e.options.onceOnly&&1==e.firedElems.length&&e.me.unbindEventWithSelectorAndCallback.call(e.target, e.selector,e.callback)},checkChildNodesRecursively:function(d,e,g,b){for(var h=0,l;l=d[h];h++)g(l,e,b)&&b.push({callback:e.callback,elem:l}),0<l.childNodes.length&&c.checkChildNodesRecursively(l.childNodes,e,g,b)},mergeArrays:function(d,e){var g={},b;for(b in d)d.hasOwnProperty(b)&&(g[b]=d[b]);for(b in e)e.hasOwnProperty(b)&&(g[b]=e[b]);return g},toElementsArray:function(d){"undefined"===typeof d||"number"===typeof d.length&&d!==a||(d=[d]);return d}}}(),v=function(){var t=function(){this._eventsBucket= [];this._beforeRemoving=this._beforeAdding=null};t.prototype.addEvent=function(d,e,g,b){d={target:d,selector:e,options:g,callback:b,firedElems:[]};this._beforeAdding&&this._beforeAdding(d);this._eventsBucket.push(d);return d};t.prototype.removeEvent=function(d){for(var e=this._eventsBucket.length-1,g;g=this._eventsBucket[e];e--)d(g)&&(this._beforeRemoving&&this._beforeRemoving(g),(g=this._eventsBucket.splice(e,1))&&g.length&&(g[0].callback=null))};t.prototype.beforeAdding=function(d){this._beforeAdding= d};t.prototype.beforeRemoving=function(d){this._beforeRemoving=d};return t}(),p=function(t,d){var e=new v,g=this,b={fireOnAttributesModification:!1};e.beforeAdding(function(h){var l=h.target;if(l===a.document||l===a)l=document.getElementsByTagName("html")[0];var q=new MutationObserver(function(x){d.call(this,x,h)});var r=t(h.options);q.observe(l,r);h.observer=q;h.me=g});e.beforeRemoving(function(h){h.observer.disconnect()});this.bindEvent=function(h,l,q){l=c.mergeArrays(b,l);for(var r=c.toElementsArray(this), x=0;x<r.length;x++)e.addEvent(r[x],h,l,q)};this.unbindEvent=function(){var h=c.toElementsArray(this);e.removeEvent(function(l){for(var q=0;q<h.length;q++)if(this===n||l.target===h[q])return!0;return!1})};this.unbindEventWithSelectorOrCallback=function(h){var l=c.toElementsArray(this);e.removeEvent("function"===typeof h?function(q){for(var r=0;r<l.length;r++)if((this===n||q.target===l[r])&&q.callback===h)return!0;return!1}:function(q){for(var r=0;r<l.length;r++)if((this===n||q.target===l[r])&&q.selector=== h)return!0;return!1})};this.unbindEventWithSelectorAndCallback=function(h,l){var q=c.toElementsArray(this);e.removeEvent(function(r){for(var x=0;x<q.length;x++)if((this===n||r.target===q[x])&&r.selector===h&&r.callback===l)return!0;return!1})};return this},m=new function(){function t(g,b,h){return c.matchesSelector(g,b.selector)&&(g._id===n&&(g._id=y++),-1==b.firedElems.indexOf(g._id))?(b.firedElems.push(g._id),!0):!1}var d={fireOnAttributesModification:!1,onceOnly:!1,existing:!1};m=new p(function(g){var b= {attributes:!1,childList:!0,subtree:!0};g.fireOnAttributesModification&&(b.attributes=!0);return b},function(g,b){g.forEach(function(h){var l=h.addedNodes,q=h.target,r=[];null!==l&&0<l.length?c.checkChildNodesRecursively(l,b,t,r):"attributes"===h.type&&t(q,b,r)&&r.push({callback:b.callback,elem:q});c.callCallbacks(r,b)})});var e=m.bindEvent;m.bindEvent=function(g,b,h){"undefined"===typeof h?(h=b,b=d):b=c.mergeArrays(d,b);var l=c.toElementsArray(this);if(b.existing){for(var q=[],r=0;r<l.length;r++)for(var x= l[r].querySelectorAll(g),z=0;z<x.length;z++)q.push({callback:h,elem:x[z]});if(b.onceOnly&&q.length)return h.call(q[0].elem,q[0].elem);setTimeout(c.callCallbacks,1,q)}e.call(this,g,b,h)};return m},w=new function(){function t(g,b){return c.matchesSelector(g,b.selector)}var d={};w=new p(function(){return{childList:!0,subtree:!0}},function(g,b){g.forEach(function(h){h=h.removedNodes;var l=[];null!==h&&0<h.length&&c.checkChildNodesRecursively(h,b,t,l);c.callCallbacks(l,b)})});var e=w.bindEvent;w.bindEvent= function(g,b,h){"undefined"===typeof h?(h=b,b=d):b=c.mergeArrays(d,b);e.call(this,g,b,h)};return w};f&&u(f.fn);u(HTMLElement.prototype);u(NodeList.prototype);u(HTMLCollection.prototype);u(HTMLDocument.prototype);u(Window.prototype);f={};k(m,f,"unbindAllArrive");k(w,f,"unbindAllLeave");return f}}(window,"undefined"===typeof jQuery?null:jQuery,void 0);