CentralNotice (Which is different from DismissableSiteNotice) uses raw html for the banner.
So you could definitely do that if you wanted in the central notice banners. Using the current stewvote banner as an example https://meta.wikimedia.org/wiki/Special:CentralNoticeBanners/edit/stewvote
replacing the line <a class="cnotice-full-banner-click external text" href="//meta.wikimedia.org/wiki/Special:MyLanguage/Stewards/Elections_2018">
with <a class="cnotice-full-banner-click external text" href="//meta.wikimedia.org/wiki/Special:MyLanguage/Stewards/Elections_2018" onclick="mw.centralNotice.hideBanner();return true;">
would probably do it [I have not tested this].
-- Brian
On Thu, Feb 15, 2018 at 10:51 PM, [[kgh]] <mediawiki@kghoffmeyer.de> wrote:
Heiya,
is there a way to dismiss the dismissable sitenotice the same moment it takes me to the landing page after clicking on the respective link?
E.g. currently the steward elections are on (hope you all participate): When I click on the link within the sitenotice that takes me to metawiki I would like the sitenotice not to reappear as soon as I go back to the originating wiki. Ideally this link should have a _blank link target, i.e. open a new tab when being clicked.
I have the suspicion that this may not work at all, otherwise WMF would probably already do it like this rather than requiring to dismiss the sitenotice sparately, i.e. even though I already followed the link.
I hope you get the point. Any advice will be apprechiated.
Cheers Karsten
MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l