First, good question - I also notice this and it hugely annoys me.
The solution will depend on how the site disables text selection. As you write, this can be done using either CSS or JavaScript.
Disabled via CSS
The site most likely uses the CSS propert "user-select".
user-select: none; will disable text selection.
To fix this, you would have to change the CSS styling the site uses. This can be done by running this small JavaScript snippet:
document.styleSheets[0].insertRule("* { user-select:text !important }", 1);
This will insert a new CSS rule that overrides the "user-select" setting of the page.
To run this: Either paste it into the JavaScript console of your browser's developer tools (and press enter), or use a userscript manager .
Disabled via JavaScript
This is probably trickier, because there are multiple ways of doing this. Most involve registering an event handler for mouse or selection events, but there are multiple events and multiple ways of registering them, so it's hard to give a general rule.
The pragmatic solution probably would be to temporarily disable JavaScript.
However, most sites I have seen that disable selection do it via CSS nowadays.