EditNoticesOnMobile

EditNoticesOnMobile is a gadget that allows edit notices to be shown on MobileFrontend. Source code: w:en:MediaWiki:Gadget-EditNoticesOnMobile.js.

Usage edit

This gadget uses client-side javascript to check for, and then display edit notices when editing pages. This gadget only runs on mobile versions of pages using the Minerva skin.

For edit notice creators: if an element is included with the "nopopupnotice" class anywhere in the notice, automatic popups will be suppressed for that notice. (but the user could still view them using the button)

Opting in and out edit

On projects where the gadget is available registered users may disable the gadget in their preferences. You may disable the automatic pop-up using the popup dialog controls. Note, as disabling the automatic pop-up relies on local storage this setting is specific to each browser. Once opted-out, one may opt-in again using the same process.

Where do I report feature requests and bugs? edit

On the talk page on English Wikipedia. Please ping the author if you want a quick response.

Installation edit

First copy the contents of w:en:MediaWiki:Gadget-EditNoticesOnMobile.js to your wiki. For language support besides English, copy w:en:MediaWiki:Gadget-EditNoticesOnMobile.js/i18n.json as well.

If the {{Editnotice load}} template on your project (d:Q6854142) includes the "nomobile" class that should be removed. (like w:en:Special:diff/1097074576)

As a gadget edit

  • Create MediaWiki:Gadget-EditNoticesOnMobile with for example Enable [[Wikipedia:Editnotice|editnotices]] on the mobile site. ([[MediaWiki:Gadget-EditNoticesOnMobile.js|source]])
  • Add this line in a relevant section in MediaWiki:Gadgets-definition: EditNoticesOnMobile[ResourceLoader|targets=mobile|skins=minerva|supportsUrlLoad|default]|dependencies=mediawiki.storage|EditNoticesOnMobile.js

Users will be able to turn off the script in their preferences. (if they are logged in) EditNoticesOnMobile supports both mobile and desktop Minerva.

In Mobile.js edit

Add

mw.loader.load(mw.config.get('wgServer')+'/w/index.php?title=MediaWiki:Gadget-EditNoticesOnMobile.js&action=raw&ctype=text/javascript');

to MediaWiki:Mobile.js. Users won't be able to turn the script off.

You need to be an interface administrator to install a script for all users.

Projects using EditNoticesOnMobile edit

See [1].

Translations edit

Translations are stored in i18n.json, for example w:en:MediaWiki:Gadget-EditNoticesOnMobile.js/i18n.json. They are loaded from the project you are on, not English Wikipedia. (unless you are on English Wikipedia) To translate, copy the "qqq" language, change "qqq" to your language code and translate the messages.

See also edit