You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

6 lines
3.2 KiB

(function(_ds){var window=this;'use strict';var FW=function(a){return(0,_ds.V)('<span class="devsite-tooltip-msg">'+_ds.tq(a.up)+"</span>")},HW=function(){var a=_ds.Lt.call(this)||this;a.h=new _ds.Qj;a.j=null;a.m=null;a.o=new _ds.Nj(function(){return GW(a)},250);return a},LW=function(a){a.h.listen(document.body,"devsite-content-updated",function(){return a.o.ra()});a.h.listen(document.body,"onpointermove"in window?"pointermove":"mousemove",function(b){b=b.target;for(var c=!1;b;){b.hasAttribute&&(c=IW(b));if(c)break;b=b.parentNode}b&&
c?JW(a,b):KW(a)});a.h.listen(document.body,"focusin",function(b){b=b.target;var c=b.firstElementChild;(b.classList.contains("devsite-nav-title")&&c?IW(c):IW(b))?JW(a,b):KW(a)});a.h.listen(document.body,["devsite-sticky-scroll","devsite-sticky-resize"],function(){return KW(a)})},IW=function(a){return a.hasAttribute("no-tooltip")?!1:a.hasAttribute("data-title")||a.hasAttribute("data-tooltip")||a.hasAttribute("tooltip")&&a.clientWidth<a.scrollWidth},JW=function(a,b){if(a.j!==b){KW(a);var c=b.getAttribute("data-tooltip")||
b.getAttribute("data-title")||b.textContent.trim(),d=_ds.ir(FW,{up:c});d.style.opacity=0;document.body.appendChild(d);var e=_ds.Mg(window),g=_ds.nk(b),k=_ds.nk(d),l=_ds.jk(b);c=l.y+g.height;g=l.x+g.width/2-k.width/2;k.width>e.width?g=0:(g=Math.max(g,8),e=e.width-(g+k.width+8),0>e&&(g=g+e-8));d.style.top=c+"px";d.style.left=g+"px";a.j=b;a.m=d;window.requestAnimationFrame(function(){d.style.opacity=1})}},KW=function(a){if(a.j){a.j=null;var b=a.m;a.m=null;_ds.dg(b,_ds.ex,function(){_ds.ah(b);_ds.Xg(b)});
window.setTimeout(function(){_ds.ah(b);_ds.Xg(b)},1E3);b.style.opacity=0}},GW=function(a){Array.from(document.querySelectorAll(".devsite-article-body [title]")).forEach(function(b){b.setAttribute("data-title",b.getAttribute("title"));b.removeAttribute("title")});a.hasAttribute("blocked-link")&&Array.from(document.getElementsByTagName("a")).forEach(function(b){if(b.hasAttribute("href")){for(var c=(new URL(b.getAttribute("href"),document.location.origin)).hostname.replace("www.",""),d=0;d<MW.length;d++)if(-1!==
c.indexOf(MW[d]))return;for(d=0;d<NW.length;d++)if(-1!==c.indexOf(NW[d])){b.setAttribute("data-title","This link may not be accessible in your region.");b.removeAttribute("title");break}}})};var MW=["dl.google.com"],NW="abc.xyz admob.com android.com blogger.com blogspot.com chrome.com chromium.org domains.google doubleclick.com feedburner.com g.co ggpht.com gmail.com gmodules.com goo.gl google.com google.org googleapis.com googleapps.com googlecode.com googledrive.com googlemail.com googlesource.com googlesyndication.com googletagmanager.com googleusercontent.com gv.com keyhole.com madewithcode.com panoramio.com urchin.com withgoogle.com youtu.be youtube.com ytimg.com".split(" ");
_ds.t(HW,_ds.Lt);HW.prototype.connectedCallback=function(){document.body.hasAttribute("touch")?_ds.ah(this):(LW(this),this.o.ra())};HW.prototype.disconnectedCallback=function(){_ds.Lt.prototype.disconnectedCallback.call(this);_ds.Wj(this.h)};HW.prototype.disconnectedCallback=HW.prototype.disconnectedCallback;HW.prototype.connectedCallback=HW.prototype.connectedCallback;try{window.customElements.define("devsite-tooltip",HW)}catch(a){console.warn("devsite.app.customElement.DevsiteTooltip",a)};})(_ds_www);