ci: rebuild presence artifacts
This commit is contained in:
+54
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"generatedAt": "2026-04-25T21:24:33.840Z",
|
||||
"presences": [
|
||||
{
|
||||
"id": "netflix",
|
||||
"name": "Netflix",
|
||||
"description": "Shows the title and episode you're watching on Netflix.",
|
||||
"version": "1.0.0",
|
||||
"author": "hibna",
|
||||
"match": [
|
||||
"https://www.netflix.com/*"
|
||||
],
|
||||
"tickInterval": 1500
|
||||
},
|
||||
{
|
||||
"id": "primevideo",
|
||||
"name": "Prime Video",
|
||||
"description": "Shows the title you're watching on Amazon Prime Video.",
|
||||
"version": "1.0.0",
|
||||
"author": "hibna",
|
||||
"match": [
|
||||
"https://www.primevideo.com/*",
|
||||
"https://www.amazon.com/gp/video/*",
|
||||
"https://www.amazon.com/-/*/gp/video/*",
|
||||
"https://www.amazon.co.uk/gp/video/*",
|
||||
"https://www.amazon.de/gp/video/*"
|
||||
],
|
||||
"tickInterval": 1500
|
||||
},
|
||||
{
|
||||
"id": "spotify",
|
||||
"name": "Spotify Web",
|
||||
"description": "Reflects what you're listening to on open.spotify.com.",
|
||||
"version": "1.0.0",
|
||||
"author": "hibna",
|
||||
"match": [
|
||||
"https://open.spotify.com/*"
|
||||
],
|
||||
"tickInterval": 1500
|
||||
},
|
||||
{
|
||||
"id": "youtube",
|
||||
"name": "YouTube",
|
||||
"description": "Shows the video you're watching on YouTube as a Source rich presence.",
|
||||
"version": "1.0.0",
|
||||
"author": "hibna",
|
||||
"match": [
|
||||
"https://www.youtube.com/*",
|
||||
"https://music.youtube.com/*"
|
||||
],
|
||||
"tickInterval": 1000
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
"use strict";var l=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var d=(e,t)=>{for(var n in t)l(e,n,{get:t[n],enumerable:!0})},m=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of u(t))!c.call(e,i)&&i!==n&&l(e,i,{get:()=>t[i],enumerable:!(r=s(t,i))||r.enumerable});return e};var f=e=>m(l({},"__esModule",{value:!0}),e);var A={};d(A,{default:()=>w});module.exports=f(A);var o=Object.freeze({PLAYING:0,LISTENING:2,WATCHING:3});function h(){return document.querySelector("video")}function p(){return(document.querySelector("[data-uia='video-title'] h4")??document.querySelector(".video-title h4")??document.querySelector("[data-uia='player-title']"))?.textContent?.trim()??null}function y(){let e=document.querySelector("[data-uia='video-title']")??document.querySelector(".video-title");if(!e)return null;let t=Array.from(e.querySelectorAll("span")).map(n=>n.textContent?.trim()).filter(n=>!!n&&n.length>0);return t.length>0?t.join(" \xB7 "):null}function g(){return location.pathname.startsWith("/watch/")}function T(){return location.pathname.startsWith("/browse/genre")?"Browsing genres":location.pathname.startsWith("/latest")?"Browsing new releases":location.pathname.startsWith("/my-list")?"Browsing my list":location.pathname.startsWith("/search")?"Searching":location.pathname.startsWith("/title/")?"Viewing title":"Browsing"}var w={match:["https://www.netflix.com/*"],tickInterval:1500,tick(e){if(!g()){e.setActivity({type:o.WATCHING,name:"Netflix",details:T()});return}let t=h(),n=p();if(!t||!n){e.setActivity({type:o.WATCHING,name:"Netflix",details:"Loading\u2026"});return}let r=y(),i=t.paused,a=Number.isFinite(t.duration)&&t.duration>0?Math.floor((t.duration-t.currentTime)*1e3):null;e.setActivity({type:o.WATCHING,name:"Netflix",details:n,state:r?`${i?"Paused":"Watching"} \xB7 ${r}`:i?"Paused":"Watching",url:location.href,startedAt:i?null:Date.now()-Math.floor(t.currentTime*1e3),endsAt:i||a===null?null:Date.now()+a})}};
|
||||
+1
@@ -0,0 +1 @@
|
||||
"use strict";var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var c=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},m=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of u(t))!s.call(e,o)&&o!==n&&a(e,o,{get:()=>t[o],enumerable:!(i=d(t,o))||i.enumerable});return e};var p=e=>m(a({},"__esModule",{value:!0}),e);var b={};c(b,{default:()=>T});module.exports=p(b);var r=Object.freeze({PLAYING:0,LISTENING:2,WATCHING:3});function f(){return document.querySelector("video.webPlayerElement, video.rendererContainer__video, video[src], video")}function w(){return document.querySelector(".webPlayerSDKContainer")||document.querySelector("[data-automation-id='webPlayer']")?!0:/\/(detail|gp\/video\/detail)\//.test(location.pathname)===!1&&document.querySelector("video")!==null&&location.pathname.includes("/video/")}function y(){let e=["h1.atvwebplayersdk-title-text",".atvwebplayersdk-title-text","[data-automation-id='title']",".webPlayerSDKContainer h1"];for(let t of e){let i=document.querySelector(t)?.textContent?.trim();if(i)return i}return null}function v(){let e=[".atvwebplayersdk-subtitle-text","[data-automation-id='subtitle']"];for(let t of e){let i=document.querySelector(t)?.textContent?.trim();if(i)return i}return null}function h(){return(document.querySelector("[data-automation-id='title']")??document.querySelector("h1"))?.textContent?.trim()??null}function g(){let e=location.pathname;return/\/(detail|gp\/video\/detail)\//.test(e)?"Viewing title":e.includes("/search/")||location.search.includes("phrase=")?"Searching":e.includes("/storefront/")?"Browsing store":e.includes("/library/")||e.includes("/watchlist")?"Browsing watchlist":"Browsing"}var T={match:["https://www.primevideo.com/*","https://www.amazon.com/gp/video/*","https://www.amazon.com/-/*/gp/video/*","https://www.amazon.co.uk/gp/video/*","https://www.amazon.de/gp/video/*"],tickInterval:1500,tick(e){let t=f();if(t&&w()){let n=y();if(!n){e.setActivity({type:r.WATCHING,name:"Prime Video",details:"Loading\u2026"});return}let i=v(),o=t.paused,l=Number.isFinite(t.duration)&&t.duration>0?Math.floor((t.duration-t.currentTime)*1e3):null;e.setActivity({type:r.WATCHING,name:"Prime Video",details:n,state:i?`${o?"Paused":"Watching"} \xB7 ${i}`:o?"Paused":"Watching",url:location.href,startedAt:o?null:Date.now()-Math.floor(t.currentTime*1e3),endsAt:o||l===null?null:Date.now()+l});return}if(/\/(detail|gp\/video\/detail)\//.test(location.pathname)){let n=h();e.setActivity({type:r.WATCHING,name:"Prime Video",details:n?`Viewing ${n}`:"Viewing title"});return}e.setActivity({type:r.WATCHING,name:"Prime Video",details:g()})}};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
"use strict";var o=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var c=(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of s(t))!u.call(e,a)&&a!==n&&o(e,a,{get:()=>t[a],enumerable:!(i=l(t,a))||i.enumerable});return e};var y=e=>d(o({},"__esModule",{value:!0}),e);var A={};c(A,{default:()=>g});module.exports=y(A);var r=Object.freeze({PLAYING:0,LISTENING:2,WATCHING:3});function p(){return document.querySelector('[data-testid="now-playing-widget"] [data-testid="context-item-info-title"]')?.textContent?.trim()??null}function f(){let e=document.querySelectorAll('[data-testid="now-playing-widget"] [data-testid="context-item-info-artist"]');return e.length===0?null:Array.from(e).map(t=>t.textContent?.trim()).filter(Boolean).join(", ")||null}function m(){return(document.querySelector('[data-testid="control-button-playpause"]')?.getAttribute("aria-label")?.toLowerCase()??"").includes("pause")?"playing":"paused"}var g={match:["https://open.spotify.com/*"],tickInterval:1500,tick(e){let t=p();if(!t){e.setActivity({type:r.LISTENING,name:"Spotify",details:"Browsing"});return}let n=f(),i=m();e.setActivity({type:r.LISTENING,name:"Spotify",details:t,state:n?`${i==="playing"?"Playing":"Paused"} \xB7 ${n}`:i==="playing"?"Playing":"Paused",url:location.href})}};
|
||||
Vendored
+1
@@ -0,0 +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)})}};
|
||||
Reference in New Issue
Block a user