Comments (3)
IIRC, the place where I found the room ID on transcript pages was from the room info link's href
. The selector for it is '#sidebar-content .room-mini .room-mini-header .room-name a'
and room = (/^(?:https?:)?(?:\/\/chat(?:\.meta)?\.stack(?:overflow|exchange)\.com)?\/rooms\/(\d+)/.exec(roomNameLink.href) || [false, false])[1];
I'd write it differently if I was doing it again, but it works, so I haven't touched it for quite a while.
from so-mod-userscripts.
What about just taking it from the URL, like
const [, roomId] = location.href.match(/\/(\d+)\/?/) || [, undefined];
from so-mod-userscripts.
Because the room ID isn't always available in the transcript URL (e.g. https://chat.stackexchange.com/transcript/message/62846058
).
from so-mod-userscripts.
Related Issues (20)
- <Post Headers & Question TOC> New Stack Exchange CSS bumps post bodies to the right HOT 2
- Left corner no click HOT 2
- Hello
- Sandboxed scripts can't (always) access jQuery HOT 2
- Suspicious Voting Helper: network UID query needs updating
- StackExchangeDarkMode: Last commit made script stop working HOT 1
- Refresh Empty Mod Queueu flag count selector outdated
- Auto update the new activity bar HOT 4
- Fix display of mod diamond on chat topbar
- MMH: Big padding on the /admin page HOT 1
- Deleted Users Helper links to a wrong/non-existent user ending with numbers due to post-migration HOT 1
- Deleted Users Helper triggers on revisiting merged questions HOT 1
- Can the reduce clutter script hide "Related question" under new questions? HOT 2
- Chat Transcripts By Default breaks chat conversation links
- CircuitLab simulate circuit links get intercepted by Lightbox Images HOT 1
- Lightbox Images script breaks close button on questions HOT 1
- anything you can do about the new colors? HOT 1
- ReduceClutter - ServerFault top bar expanded due to malformed image HOT 1
- ReduceClutter breaks Q&A links on profile page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from so-mod-userscripts.