Page MenuHomePhabricator

Add CSS class or DOM id for page content
Closed, ResolvedPublic

Description

It would be nice if you could add a css class or dom id for page content - not including sidebar, editor, and so on. Now it should be

$('.mw-content-ltr, .mw-content-rtl')

minus

$('.diff-otitle, .diff-ntitle')

maybe even some more, because it has not unique class or id. It will help a lot for scripts and gadgets, and I believe it will take you about one second to change the code. Thank you.

Event Timeline

mw-content-text exists since T33417#346088
I don't know where to see diff-otitle.
Please do provide steps to reproduce when creating tasks.

Thanks, @Aklapper, but mw-content-text includes wiki editor window, so it can't be used.
And diff-otitle, diff-ntitle are two information windows with links above the diff window in versions diff - one for current version and one for previous one.
What do you mean in "steps" in this text?

Thanks, @Aklapper, but mw-content-text includes wiki editor window, so it can't be used.

When? Where? If I go to a random page like https://en.wikipedia.org/wiki/Ice_cream I don't see any "wiki editor window".

What do you mean in "steps" in this text?

Clear steps to see the problem, as in any other task that tries to describe a problem.
As long as noone else can reproduce the problem that made you file this enhancement request, we're all just guessing. See https://mediawiki.org/wiki/How_to_report_a_bug

When? Where? If I go to a random page like https://en.wikipedia.org/wiki/Ice_cream I don't see any "wiki editor window".

Go to https://en.wikipedia.org/w/index.php?title=Ice_cream&action=edit, you'll see.

Clear steps to see the problem, as in any other task that tries to describe a problem.
As long as noone else can reproduce the problem that made you file this enhancement request, we're all just guessing. See https://mediawiki.org/wiki/How_to_report_a_bug

But there is no bug here, and no actions to "reproduce" something - there's nothing to reproduce.

It's irrelevant if there is a bug or not - we need to reproduce the situation that made you file a task.
So far noone knew that you are refering to &action=edit specifically.
Please include clear steps to reproduce in your future tasks.

I see, I thought if I say wiki editor one can understand I'm talking about the editor. I'll try.

There is no "wiki editor" mentioned in the task description.

"not including sidebar, editor, and so on" :-)

Volker_E renamed this task from Add css class or dom id for page content to Add CSS class or DOM id for page content.Sep 30 2020, 10:20 AM
matmarex subscribed.

Since 2017 you can use the selector #mw-content-text .mw-parser-output for this. It was implemented in T37247.