PageSourceSearch

https://www.motoplanete.com/assets/controllers/front/millesime_toolbox_controller-ik_7qlO.js

js motoplanete.com collected 2026-10-02 04:25:40 UTC 1,998 bytes, 5 lines download raw bytes

1import{Controller}from"@hotwired/stimulus";export default class extends Controller{static targets=["button"];connect(){const e=document.querySelector("main");this.trad={vlf:e.getAttribute("data-trad-vlf"),ap:e.getAttribute("data-trad-ap")}}open(e){e.stopPropagation();const t=e.currentTarget,n=t.getAttribute("data-href"),s=t.querySelector("picture").outerHTML;this.filigrane=document.createElement("div"),this.filigrane.className="filigrane",this.filigrane.setAttribute("data-action","click->front--millesime-toolbox#close"),this.tooltip=document.createElement("div"),this.tooltip.className="tooltip-content",this.tooltip.innerHTML=`
2            <div class="v-fiche"><a href="${n}">${this.trad.vlf} <em class="icon-caret-right"></em></a></div>
3            <div class="a-photo"><a class="showImage">${this.trad.ap} <em class="icon-search"></em></a></div>
4            <span class="close" data-action="click->front--millesime-toolbox#close"><em class="icon-cancel-circle"></em></span>
5        `,this.centerElement(this.tooltip,200,80),document.querySelector(".page").append(this.filigrane,this.tooltip),this.tooltip.querySelector(".close").addEventListener("click",()=>{this.close()}),this.tooltip.querySelector(".showImage").addEventListener("click",()=>{this.expandImage(s)})}expandImage(e){this.tooltip.querySelectorAll("div").forEach(e=>e.remove()),this.tooltip.insertAdjacentHTML("afterbegin",e);const t=this.tooltip.querySelector("img"),n=Math.min(window.innerWidth-50,500),s=n/parseInt(t.getAttribute("width")||t.clientWidth);t.style.maxWidth=`${window.innerWidth-50}px`,t.setAttribute("width",n),t.getAttribute("height")&&t.setAttribute("height",Math.ceil(parseInt(t.getAttribute("height"))*s)),this.centerElement(this.tooltip)}centerElement(e,t=null,n=null){const s=t||e.clientWidth,o=n||e.clientHeight;e.style.left=`${(window.innerWidth-s)/2}px`,e.style.top=`${window.scrollY+(window.innerHeight-o)/2}px`}close(){this.filigrane&&this.filigrane.remove(),this.tooltip&&this.tooltip.remove()}}

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.