Skip to content

Commit

Permalink
allActivities+mediaTweaks: fixes for latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Cynosphere committed Jan 29, 2025
1 parent 89f9217 commit 2e9b980
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 15 deletions.
5 changes: 3 additions & 2 deletions src/allActivities/manifest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"$schema": "https://moonlight-mod.github.io/manifest.schema.json",
"id": "allActivities",
"version": "1.0.2",
"version": "1.0.3",
"meta": {
"name": "All Activities",
"tagline": "Shows all activities in user popouts, and optionally icons in the member list",
"authors": ["Cynosphere"],
"tags": ["profiles"],
"source": "https://github.com/Cynosphere/moonlight-extensions",
"donate": "https://ko-fi.com/Cynosphere"
"donate": "https://ko-fi.com/Cynosphere",
"changelog": "- Fixes for latest Discord\n- Icon cards no longer have a background"
},
"settings": {
"icons": {
Expand Down
2 changes: 2 additions & 0 deletions src/allActivities/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

.allActivities-iconCard {
width: 250px;
background: transparent;
padding: 0;
}

.allActivities-iconTooltip {
Expand Down
12 changes: 7 additions & 5 deletions src/allActivities/webpackModules/activities.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import React from "@moonlight-mod/wp/react";
import spacepack from "@moonlight-mod/wp/spacepack_spacepack";

const UserProfileActivityCardWrapper = spacepack.findByCode('location:"' + 'UserProfileActivityCardWrapper"')[0].exports
.Z;
const UserProfileStreamActivityCard = spacepack.findByCode('surface:"' + 'user-profile-stream-activity-card",')[0]
.exports.Z;
const useUserProfileActivity = spacepack.findByCode('("use-user-' + 'profile-activity")')[0].exports.Z;
const UserProfileActivityCardWrapper = spacepack.findByCode(
`location:${JSON.stringify("UserProfileActivityCardWrapper")}`
)[0].exports.Z;
const UserProfileStreamActivityCard = spacepack.findByCode(
`surface:${JSON.stringify("user-profile-stream-activity-card")},`
)[0].exports.Z;
const useUserProfileActivity = spacepack.findByCode(`${JSON.stringify("use-user-profile-activity")}`)[0].exports.Z;
const useUserActivityFeedRecent = spacepack.findByCode(
'"application_id"in',
".extra.application_id",
Expand Down
7 changes: 4 additions & 3 deletions src/allActivities/webpackModules/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import { ApplicationStore, GameStore, UserStore } from "@moonlight-mod/wp/common
import MemberList from "@moonlight-mod/wp/componentEditor_memberList";
import { ActivityTypes, PlatformTypes } from "@moonlight-mod/wp/discord/Constants";

const useUserProfileActivity = spacepack.findByCode(`${'("use-user-profile-activity")'}`)[0].exports.Z;
const ConnectionPlatforms = spacepack.findByCode("getByUrl(", "get(", `${"isSupported:"}`)[0].exports.Z;
const UserProfileActivityCard = spacepack.findByCode(`${'location:"UserProfileActivityCard",'}`)[0].exports.Z;
const useUserProfileActivity = spacepack.findByCode(`${JSON.stringify("use-user-profile-activity")}`)[0].exports.Z;
const ConnectionPlatforms = spacepack.findByCode("getByUrl(", "get(", "isSupported:")[0].exports.Z;
const UserProfileActivityCard = spacepack.findByCode(`location:${JSON.stringify("UserProfileActivityCard")},`)[0]
.exports.Z;

const ActivityClasses = spacepack.findByCode(
"applicationStreamingPreviewWrapper:" + '"applicationStreamingPreviewWrapper_'
Expand Down
5 changes: 3 additions & 2 deletions src/mediaTweaks/manifest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"$schema": "https://moonlight-mod.github.io/manifest.schema.json",
"id": "mediaTweaks",
"version": "1.0.7",
"version": "1.0.8",
"meta": {
"name": "Media Tweaks",
"tagline": "Various tweaks to images and videos. Every feature togglable.",
"authors": ["Cynosphere"],
"tags": ["qol", "chat"],
"source": "https://github.com/Cynosphere/moonlight-extensions",
"donate": "https://ko-fi.com/Cynosphere"
"donate": "https://ko-fi.com/Cynosphere",
"changelog": "Fixes for latest Discord"
},
"dependencies": ["spacepack"],
"settings": {
Expand Down
6 changes: 3 additions & 3 deletions src/mediaTweaks/webpackModules/enlargeVideoButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ type MimeType = {
};

const LazyMediaModal = spacepack.findFunctionByStrings(
spacepack.findByCode(/let{location:.,contextKey:/, "openModalLazy")[0]?.exports ?? {},
"openModalLazy"
spacepack.findByCode(/let{location:\i,contextKey:/)[0]?.exports ?? {},
".MEDIA_VIEWER"
);
const MediaModalClasses = spacepack.findByCode(/\.exports={modal:"modal_[a-z0-9]+"}/)[0].exports;
const MediaModalClasses = spacepack.findByCode(/{modal:"modal_[a-z0-9]+"}/)[0].exports;

const MimeTypes = Object.entries(
spacepack.findByCode(`JSON.parse('{"application/1d-interleaved-parityfec":`)[0].exports
Expand Down

0 comments on commit 2e9b980

Please sign in to comment.