PageSourceSearch

https://robot-fan.net/assets/font-end/util.js?v=0.1.61

js robot-fan.net collected 2026-09-26 05:03:28 UTC 3,689 bytes, 79 lines download raw bytes

1function hideAllShareWrap() {
2	document.querySelectorAll(".udblock__share_wrap--open").forEach((function(e) {
3		e.style.left = "100%"
4	}))
5}
6
7function showShare(e, t,link) {
8	hideAllShareWrap();
9	var o = e.parentElement.closest(".udblock__textwrap"),
10		n = o.querySelector(".udblock__share_wrap"),
11		a = o.querySelector(".udblock__permalink");
12	if (n && a) {
13		var l = a.getAttribute("href"),
14			c = a.innerHTML;
15		l = encodeURIComponent(l), c = encodeURIComponent(c), n.innerHTML = getShareHTML(link, c, t), n.style.left = "0", n.classList.add("udblock__share_wrap--open")
16	}
17}
18
19function hideShare(e) {
20	var t = e.parentElement.closest(".udblock__textwrap").querySelector(".udblock__share_wrap");
21	t && (t.style.left = "100%")
22}
23
24function copylink(e) {
25	var t = e.getAttribute("data-link");
26	t = decodeURIComponent(t);
27	var o = document.createElement("textarea");
28	o.value = t, document.body.appendChild(o), o.select(), document.execCommand("copy"), document.body.removeChild(o), alert("คัดลอกลิงค์แล้ว")
29}
30
31function getShareHTML(e, t, o) {
32	var n = "https://www.facebook.com/sharer.php?u=" + e,
33		a = "https://twitter.com/intent/tweet?text=" + t + "&url=" + e,
34		l = "https://lineit.line.me/share/ui?url=" + e;
35	return document.getElementById("copy_elm").value = e, `\n\t\t<div class="module">\n\t\t\t<a class="udblock__share-link" href="${n}" target="_blank" >\n\t\t\t\t<span class="udblock__icon-share-red icon-facebook-color social-share-tracker" data-social-name="Facebook" data-category-slug="${o}" ></span>\n\t\t\t</a>\n\t\t\t<a class="udblock__share-link" href="${a}" target="_blank" >\n\t\t\t\t<span class="udblock__icon-share-red icon-twitter-color social-share-tracker" data-social-name="Twitter" data-category-slug="${o}" ></span>\n\t\t\t</a>\n\t\t\t<a class="udblock__share-link" href="${l}" onclick="window.open(this.href, 'mywin','left=50,top=50,width=600,height=650,toolbar=0'); return false;" >\n\t\t\t\t<span class="udblock__icon-share-red icon-line-color social-share-tracker" data-social-name="LINE" data-category-slug="${o}" ></span>\n\t\t\t</a>\n\t\t\t<a class="udblock__share-link" href="javascript:;" data-link="${e}" onclick="copylink(this)" ><span class="udblock__icon-share-red icon-link-color"></span></a>\n\t\t</div>\n\t\t<button type="button" class="udblock__share_close_btn" onclick="hideShare(this)" ><span class="udblock__close-btn icon-delete"></span></button>\n\t`
36}
37
38function copyToClipboard(e) {
39	var t = document.createElement("textarea");
40	t.value = e, document.body.appendChild(t), t.select(), document.execCommand("copy"), document.body.removeChild(t)
41}
42
43function initGlideDesktop(e) {
44	document.querySelectorAll(e + " .glide__slides .glide__slide").length > 0 && new Glide(e, {
45		type: "carousel",
46		startAt: 0,
47		perView: 1,
48		focusAt: "center",
49		peek: 0,
50		gap: 0
51	}).mount()
52}
53
54function initGlidePhone(e) {
55	if (document.querySelectorAll(e + " .glide__slides .glide__slide").length > 0) {
56		var t = new Glide(e, {
57			type: "carousel",
58			startAt: 0,
59			perView: 1,
60			focusAt: "center",
61			peek: 0,
62			gap: 0
63		}).mount();
64		window._ud_glide = window._ud_glide || [], window._ud_glide[e] = t
65	}
66}
67
68function initVideoClipsHot() {
69	var e = document.querySelector("#vue_cliphot_target");
70	if (e) {
71		new IntersectionObserver((function(e, t) {
72			e[0].isIntersecting && (homeVideo.is_load_script_youtube ? console.log("second time - not load script") : (homeVideo.init(), homeVideo.is_load_script_youtube = !0, console.log("first time load script")))
73		}), {
74			root: null,
75			rootMargin: "250px 0px",
76			threshold: 0
77		}).observe(e)
78	}
79}

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.