From c84eb9acaabf5cb8a2cdbb59a0757eb0f27725cd Mon Sep 17 00:00:00 2001 From: gitea-actions Date: Sat, 25 Apr 2026 23:06:31 +0000 Subject: [PATCH] ci: rebuild presence artifacts --- index.json | 7 +++++-- presences/youtube/dist/presence.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/index.json b/index.json index 410310a..12e53c1 100644 --- a/index.json +++ b/index.json @@ -1,5 +1,5 @@ { - "generatedAt": "2026-04-25T21:24:33.840Z", + "generatedAt": "2026-04-25T23:06:31.299Z", "presences": [ { "id": "netflix", @@ -42,10 +42,13 @@ "id": "youtube", "name": "YouTube", "description": "Shows the video you're watching on YouTube as a Source rich presence.", - "version": "1.0.0", + "version": "1.0.1", "author": "hibna", "match": [ "https://www.youtube.com/*", + "https://youtube.com/*", + "https://m.youtube.com/*", + "https://youtu.be/*", "https://music.youtube.com/*" ], "tickInterval": 1000 diff --git a/presences/youtube/dist/presence.js b/presences/youtube/dist/presence.js index e4f0a24..3946a38 100644 --- a/presences/youtube/dist/presence.js +++ b/presences/youtube/dist/presence.js @@ -1 +1 @@ -"use strict";var c=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var n in e)c(t,n,{get:e[n],enumerable:!0})},y=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of s(e))!d.call(t,o)&&o!==n&&c(t,o,{get:()=>e[o],enumerable:!(i=a(e,o))||i.enumerable});return t};var T=t=>y(c({},"__esModule",{value:!0}),t);var v={};m(v,{default:()=>b});module.exports=T(v);var u=Object.freeze({PLAYING:0,LISTENING:2,WATCHING:3});function f(){return document.querySelector("video.html5-main-video, video")}function h(){let e=(document.querySelector("h1.ytd-watch-metadata yt-formatted-string")??document.querySelector("h1.title yt-formatted-string"))?.textContent?.trim();if(e)return e;let n=document.title.replace(/\s*-\s*YouTube\s*$/i,"").trim();return n.length>0?n:null}function p(){return(document.querySelector("ytd-channel-name #text a")??document.querySelector("#owner #channel-name a"))?.textContent?.trim()??null}var b={match:["https://www.youtube.com/*","https://music.youtube.com/*"],tickInterval:1e3,tick(t){let e=f(),n=location.hostname==="music.youtube.com";if(location.pathname==="/"||location.pathname==="/feed/subscriptions"){t.setActivity({type:u.WATCHING,name:n?"YouTube Music":"YouTube",details:"Browsing"});return}if(!e){t.setActivity({type:u.WATCHING,name:n?"YouTube Music":"YouTube",details:document.title.slice(0,128)});return}let i=h();if(!i){t.clear();return}let o=p(),r=e.paused,l=document.querySelector(".ytp-live")!==null;t.setActivity({type:n?u.LISTENING:u.WATCHING,name:n?"YouTube Music":"YouTube",details:i,state:o?`${r?"Paused":l?"Live":"Playing"} \xB7 ${o}`:r?"Paused":l?"Live":"Playing",url:location.href,startedAt:r||l?null:Date.now()-Math.floor(e.currentTime*1e3),endsAt:r||l||!Number.isFinite(e.duration)?null:Date.now()+Math.floor((e.duration-e.currentTime)*1e3)})}}; +"use strict";var l=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)l(t,n,{get:e[n],enumerable:!0})},y=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of s(e))!m.call(t,o)&&o!==n&&l(t,o,{get:()=>e[o],enumerable:!(i=a(e,o))||i.enumerable});return t};var T=t=>y(l({},"__esModule",{value:!0}),t);var v={};d(v,{default:()=>b});module.exports=T(v);var u=Object.freeze({PLAYING:0,LISTENING:2,WATCHING:3});function f(){return document.querySelector("video.html5-main-video, video")}function h(){let e=(document.querySelector("h1.ytd-watch-metadata yt-formatted-string")??document.querySelector("h1.title yt-formatted-string"))?.textContent?.trim();if(e)return e;let n=document.title.replace(/\s*-\s*YouTube\s*$/i,"").trim();return n.length>0?n:null}function p(){return(document.querySelector("ytd-channel-name #text a")??document.querySelector("#owner #channel-name a"))?.textContent?.trim()??null}var b={match:["https://www.youtube.com/*","https://youtube.com/*","https://m.youtube.com/*","https://youtu.be/*","https://music.youtube.com/*"],tickInterval:1e3,tick(t){let e=f(),n=location.hostname==="music.youtube.com";if(location.pathname==="/"||location.pathname==="/feed/subscriptions"){t.setActivity({type:u.WATCHING,name:n?"YouTube Music":"YouTube",details:"Browsing"});return}if(!e){t.setActivity({type:u.WATCHING,name:n?"YouTube Music":"YouTube",details:document.title.slice(0,128)});return}let i=h();if(!i){t.clear();return}let o=p(),r=e.paused,c=document.querySelector(".ytp-live")!==null;t.setActivity({type:n?u.LISTENING:u.WATCHING,name:n?"YouTube Music":"YouTube",details:i,state:o?`${r?"Paused":c?"Live":"Playing"} \xB7 ${o}`:r?"Paused":c?"Live":"Playing",url:location.href,startedAt:r||c?null:Date.now()-Math.floor(e.currentTime*1e3),endsAt:r||c||!Number.isFinite(e.duration)?null:Date.now()+Math.floor((e.duration-e.currentTime)*1e3)})}};