mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
|
|
var metadataparser=function(t){function r(e){if(n[e])return n[e].exports;var o=n[e]={exports:{},id:e,loaded:!1};return t[e].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var n={};return r.m=t,r.c=n,r.p="",r(0)}([function(t,r,n){t.exports=n(1)},function(t,r,n){"use strict";function e(t){return t&&t.__esModule?t:{default:t}}function o(t){return t.replace(/www[a-zA-Z0-9]*\./,"").replace(".co.",".").split(".").slice(0,-1).join(" ")}function u(t){return function(r,n){for(var e=0,o=void 0,u=0;u<t.rules.length;u++){var i=(0,d.default)(t.rules[u],2),c=i[0],f=i[1],a=(0,p.default)(r.querySelectorAll(c));if(a.length){var l=!0,v=!1,y=void 0;try{for(var h,g=(0,s.default)(a);!(l=(h=g.next()).done);l=!0){var m=h.value,x=t.rules.length-u;if(t.scorers){var b=!0,A=!1,w=void 0;try{for(var S,_=(0,s.default)(t.scorers);!(b=(S=_.next()).done);b=!0){var O=S.value,L=O(m,x);L&&(x=L)}}catch(t){A=!0,w=t}finally{try{!b&&_.return&&_.return()}finally{if(A)throw w}}}x>e&&(e=x,o=f(m))}}catch(t){v=!0,y=t}finally{try{!l&&g.return&&g.return()}finally{if(v)throw y}}}}if(!o&&t.defaultValue&&(o=t.defaultValue(n)),o){if(t.processors){var j=!0,k=!1,M=void 0;try{for(var T,P=(0,s.default)(t.processors);!(j=(T=P.next()).done);j=!0){var E=T.value;o=E(o,n)}}catch(t){k=!0,M=t}finally{try{!j&&P.return&&P.return()}finally{if(k)throw M}}}return o.trim&&(o=o.trim()),o}}}function i(t,r,n){var e={},o={url:r},i=n||m;return(0,f.default)(i).map(function(r){var n=i[r],c=u(n);e[r]=c(t,o)}),e}var c=n(2),f=e(c),a=n(37),s=e(a),l=n(59),p=e(l),v=n(66),d=e(v),y=n(70),h=y.makeUrlAbsolute,g=y.parseUrl,m={description:{rules:[['meta[property="og:description"]',function(t){return t.getAttribute("content")}],['meta[name="description"]',function(t){return t.getAttribute("content")}]]},icon:{rules:[['link[rel="apple-touch-icon"]',function(t){return t.getAttribute("href")}],['link[rel="apple-touch-icon-precomposed"]',function(t){return t.getAttribute("href")}],['link[rel="icon"]',function(t){return t.getAttribute("href")}],['link[rel="fluid-icon"]',function(t){return t.getAttribute("href")}],['link[rel="shortcut icon"]',function(t){return t.getAttribute("href")}],['link[rel="Shortcut Icon"]',function(t){return t.getAttribute("href")}],['link[rel="mask-icon"]',function(t){return t.getAttribute("href")}]],scorers:[function(t,r){var n=t.getAttribute("sizes");if(n){var e=n.match(/\d+/g);if(e)return e.reduce(function(t,r){return t*r})}}],defaultValue:function(t){return"favicon.ico"},processors:[function(t,r){return h(r.url,t)}]},image:{rules:[['meta[property="og:image:secure_url"]',function(t){return t.getAttribute("content")}],['meta[property="og:image:url"]',function(t){return t.getAttribute("content")}],['meta[property="og:image"]',function(t){return t.getAttribute("content")}],['meta[name="twitter:image"]',function(t){return t.getAttribute("content")}],['meta[property="twitter:image"]',function(t){return t.getAttribute("content")}],['meta[name="thumbnail"]',function(t){return t.getAttribute("content")}]],processors:[function(t,r){return h(r.url,t)}]},keywords:{rules:[['meta[name="keywords"]',function(t){return t.getAttribute("content")}]],processors:[function(t,r){return t.split(",").map(function(t){return t.trim()})}]},title:{rules:[['meta[property="og:title"]',function(t){return t.getAttribute("content")}],['meta[name="twitter:title"]',function(t){return t.getAttribute("content")}],['meta[property="twitter:title"]',function(t){return t.getAttribute("content")}],['meta[name="hdl"]',function(t){return t.getAttribute("content")}],["title",function(t){return t.text}]]},type:{rules:[['meta[property="og:type"]',function(t){return t.getAttribute("content")}]]},url:{rules:[["a.amp-canurl",function(t){return t.getAttribute("href")}],['meta[property="og:url"]',function(t){return t.getAttribute("content")}],['link[rel="canonical"]',function(t){return t.getAttribute("href")}]],defaultValue:function(t){return t.url},processors:[function(t,r){return h(r.url,t)}]},provider:{rules:[['meta[property="og:site_name"]',function(t){return t.getAttribute("content")}]],defaultValue:function(t){return o(g(t.
|