Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Club Penguin Journey): Add support for current RoomId with Room display on Status. #9251

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

moyaimoment
Copy link
Contributor

Description

I recently contacted the Club Penguin Journey staff and asked for a way to get the current roomId and they were able to add something in the for the Presence. This update adds support for getting and using these RoomIds. This is based off the old Club Penguin Rewritten presence.
If there is a better way to do it then let me know. 🤷‍♂️

Acknowledgements

Screenshots

Proof showing the creation/modification is working as expected

image
image
image

@moyaimoment moyaimoment changed the title feat(VLC): Add support for current RoomId with Room display on Status. feat(Club Penguin Journey): Add support for current RoomId with Room display on Status. Feb 6, 2025
Comment on lines 5 to 20
actualCode = `
let roomIdLabel = document.createElement("p");
roomIdLabel.setAttribute("id", "roomId");
document.head.appendChild(roomIdLabel);

let repeatTimer = setInterval(function() {
const roomId = window.roomId;
if (roomId) {
roomIdLabel.textContent = roomId;
}
}, 100);
`,
script = document.createElement("script");
script.setAttribute("id", "injectscript");
script.textContent = actualCode;
(document.head || document.documentElement).appendChild(script);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably use presence.getPageVariable rather than injecting a script

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I didn't realize that was something I could use. It works and I've implemented it, Thanks!

@moyaimoment moyaimoment requested a review from theusaf February 11, 2025 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants