Page MenuHomePhabricator

DismissableSiteNotice relies on JavaScript to render site notice
Closed, DeclinedPublic


Author: jisok2

The site notice is shown at the top of each page. This feature requires javascript.
(I asked admins to change it, and replied that they have no power to do that.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:39 PM
bzimport set Reference to bz9209.

robchur wrote:

You're referring to the "dismiss" feature, I assume? The site notice itself
should require no JavaScript to be *shown*.

jisok2 wrote:

No, the notice itself is not displayed in non-script browsers. You can easily
see it in any ko.wikipedia page.

robchur wrote:

Ah, I see. Looking into it.

brion added a comment.Mar 7 2007, 11:18 PM

The sitenotice is shown via JavaScript when dismissable sitenotice extension is
in use.
This is a deliberate choice, to avoid polluting search engines with the site notice.

ayg wrote:

That seems . . . hacky? Why is it so important to stop searchbots from seeing it? I guess it would
become outdated, but so could any number of things on the page. It seems better to let them see
it. It would typically be irrelevant to search results anyway, and so not really influence them.

brion added a comment.Mar 8 2007, 7:02 PM

If you think adding a link to millions of pages on one of the top
sites on the web will be "irrelevant to search results", well... :)

It is a bit ugly, but it beats the alternatives for now until we completely
change how sitenotices are done.

[Before reading the above I had already prepared:]
I hereby "file suit" against the DismissableSiteNotice extension, for
violating accessibility.

On vanilla MediaWiki sites, all users always see MediaWiki:Sitenotice,
but with your extension installed, non-javascript users will never see

That is because you have forgotten to add any <noscript> statements.
[After reading the above... I think you are all... OK, fine, e.g., wikia wiki sysops have no way of making a MediaWiki:Sitenotice that all users can see for certain.]

Brion, you may wish to weigh in on whether the document.writeln() hack is still necessary.

I have a pending change gerrit 56780 that eliminates the hack for logged-in users, and it would be good to get rid of it for anons as well.

Change 261758 had a related patch set uploaded (by PleaseStand):
Remove code to hide the site notice from search engines

Restricted Application added a subscriber: revi. · View Herald TranscriptDec 31 2015, 3:29 AM