MediaWiki:Gadget-fixCrossWikiNotif.js
Ir a la navegación
Ir a la búsqueda
Limpiar la caché
Nota: Después de guardar, quizás necesites actualizar la caché de tu navegador para ver los cambios.
- Firefox/Safari: Mantén presionada la tecla Mayús mientras pulsas el botón Actualizar, o presiona Ctrl+F5 o Ctrl+R (⌘+R en Mac)
- Google Chrome: presiona Ctrl+Shift+R (⌘+Mayús+R en Mac)
- Microsoft Edge: presiona la combinación Ctrl+Shift+R
- Opera: vacía la caché en Herramientas → Preferencias
mw.loader.using(['ext.echo.api', 'mediawiki.language']).then(function() { if (mw.echo.api.EchoApi.prototype.DEFAULTfetchNotifications) return; mw.echo.api.EchoApi.prototype.DEFAULTfetchNotifications = mw.echo.api.EchoApi.prototype.fetchNotifications; mw.echo.api.EchoApi.prototype.fetchNotifications = function() { return this.DEFAULTfetchNotifications.apply(this, arguments).then(function(data) { var foreignNotifData = ( data || { list: [] } ).list.find(function(notifData) { return notifData.type === 'foreign'; }), wikiList, source, title; if (foreignNotifData) { wikiList = []; for (source in foreignNotifData.sources) { title = source.replace('_', '.wiki.gg/').replace(/\/en$/, ''); wikiList.push(title); foreignNotifData.sources[source].title = title; foreignNotifData.sources[source].url = 'https://' + title + '/api.php'; foreignNotifData.sources[source].base = 'https://' + title + '/wiki/$1'; } if (foreignNotifData['*'] && foreignNotifData['*'].body === mw.language.listToText(Array(wikiList.length).fill(''))) { foreignNotifData['*'].body = mw.language.listToText(wikiList); } } return data; }); }; });