User:Zachary/usefulLinks.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
addOnloadHook(
function () {
mw.util.addPortletLink('p-cactions', '#', 'useful links', 'ca-message');
document.getElementById('ca-message').setAttribute('onClick', 'showCustomMessage()');
}
);
function showCustomMessage() {
var msg = '';
msg += '<table style="width:100%;text-align:center;">';
msg += '<tr>';
msg += '<th><a href="http://meta.wikimedia.org/"><img src="http://commons.wikimedia.org/w/thumb.php?f=Wikimedia-logo.svg&w=32" alt="Meta" style="border:0;"/></a></th>';
msg += '<th><a href="http://commons.wikimedia.org/"><img src="http://commons.wikimedia.org/w/thumb.php?f=Commons-logo.svg&w=32" alt="Commons" style="border:0;"/></a></th>';
msg += '<th><a href="http://species.wikimedia.org/"><img src="http://commons.wikimedia.org/w/thumb.php?f=Wikispecies-logo.svg&w=32" alt="Wikispecies" style="border:0;"/></a></th>';
msg += '<th><a href="http://mediawiki.org/"><img src="http://commons.wikimedia.org/w/thumb.php?f=Mediawiki-logo.png&w=32" alt="Mediawiki" style="border:0;"/></a></th>';
msg += '<th><a href="http://en.wikipedia.org/"><img src="http://commons.wikimedia.org/w/thumb.php?f=Wikipedia-logo.png&w=32" alt="Wikipedia" style="border:0;"/></a></th>';
msg += '<th><a href="http://en.wikinews.org/"><img src="http://commons.wikimedia.org/w/thumb.php?f=Wikinews-logo.svg&w=32" alt="Wikinews" style="border:0;"/></a></th>';
msg += '<th><a href="http://en.wikiquote.org/"><img src="http://commons.wikimedia.org/w/thumb.php?f=Wikiquote-logo.svg&w=32" alt="Wikiquote" style="border:0;"/></a></th>';
msg += '<th><a href="http://en.wiktionary.org/"><img src="http://commons.wikimedia.org/w/thumb.php?f=Wiktprintable_without_text.svg&w=32" alt="Wiktionary" style="border:0;"/></a></th>';
msg += '<th><a href="http://en.wikibooks.org/"><img src="http://commons.wikimedia.org/w/thumb.php?f=Wikibooks-logo.svg&w=32" alt="Wikibooks" style="border:0;"/></a></th>';
msg += '<th><a href="http://en.wikisource.org.org/"><img src="http://commons.wikimedia.org/w/thumb.php?f=Wikisource-logo.svg&w=32" alt="Wikisource" style="border:0;"/></a></th>';
msg += '<th><a href="http://en.wikiversity.org/"><img src="http://commons.wikimedia.org/w/thumb.php?f=Wikiversity-logo.svg&w=32" alt="Wikiversity" style="border:0;"/></a></th>';
msg += '</tr>';
msg += '<tr>';
msg += '<td><a href="http://meta.wikimedia.org/wiki/Special:Recentchanges">Recent</a></td>';
msg += '<td><a href="http://commons.wikimedia.org/wiki/Special:Recentchanges">Recent</a></td>';
msg += '<td><a href="http://species.wikimedia.org/wiki/Special:Recentchanges">Recent</a></td>';
msg += '<td><a href="http://mediawiki.org/wiki/Special:Recentchanges">Recent</a></td>';
msg += '<td><a href="http://en.wikipedia.org/wiki/Special:Recentchanges">Recent</a></td>';
msg += '<td><a href="http://en.wikinews.org/wiki/Special:Recentchanges">Recent</a></td>';
msg += '<td><a href="http://en.wikiquote.org/wiki/Special:Recentchanges">Recent</a></td>';
msg += '<td><a href="http://en.wiktionary.org/wiki/Special:Recentchanges">Recent</a></td>';
msg += '<td><a href="http://en.wikibooks.org/wiki/Special:Recentchanges">Recent</a></td>';
msg += '<td><a href="http://en.wikisource.org/wiki/Special:Recentchanges">Recent</a></td>';
msg += '<td><a href="http://en.wikiversity.org/wiki/Special:Recentchanges">Recent</a></td>';
msg += '</tr>';
msg += '<tr>';
msg += '<td><a href="http://meta.wikimedia.org/wiki/Special:Watchlist">Watchlist</a></td>';
msg += '<td><a href="http://commons.wikimedia.org/wiki/Special:Watchlist">Watchlist</a></td>';
msg += '<td><a href="http://species.wikimedia.org/wiki/Special:Watchlist">Watchlist</a></td>';
msg += '<td><a href="http://mediawiki.org/wiki/Special:Watchlist">Watchlist</a></td>';
msg += '<td><a href="http://en.wikipedia.org/wiki/Special:Watchlist">Watchlist</a></td>';
msg += '<td><a href="http://en.wikinews.org/wiki/Special:Watchlist">Watchlist</a></td>';
msg += '<td><a href="http://en.wikiquote.org/wiki/Special:Watchlist">Watchlist</a></td>';
msg += '<td><a href="http://en.wiktionary.org/wiki/Special:Watchlist">Watchlist</a></td>';
msg += '<td><a href="http://en.wikibooks.org/wiki/Special:Watchlist">Watchlist</a></td>';
msg += '<td><a href="http://en.wikisource.org/wiki/Special:Watchlist">Watchlist</a></td>';
msg += '<td><a href="http://en.wikiversity.org/wiki/Special:Watchlist">Watchlist</a></td>';
msg += '</tr>';
msg += '<tr>';
msg += '<td><a href="http://meta.wikimedia.org/wiki/Special:Contributions/Zachary">Contribs</a></td>';
msg += '<td><a href="http://commons.wikimedia.org/wiki/Special:Contributions/Zachary">Contribs</a></td>';
msg += '<td><a href="http://species.wikimedia.org/wiki/Special:Contributions/Zachary">Contribs</a></td>';
msg += '<td><a href="http://mediawiki.org/wiki/Special:Contributions/Zachary">Contribs</a></td>';
msg += '<td><a href="http://en.wikipedia.org/wiki/Special:Contributions/Zachary">Contribs</a></td>';
msg += '<td><a href="http://en.wikinews.org/wiki/Special:Contributions/Zachary">Contribs</a></td>';
msg += '<td><a href="http://en.wikiquote.org/wiki/Special:Contributions/Zachary">Contribs</a></td>';
msg += '<td><a href="http://en.wiktionary.org/wiki/Special:Contributions/Zachary">Contribs</a></td>';
msg += '<td><a href="http://en.wikibooks.org/wiki/Special:Contributions/Zachary">Contribs</a></td>';
msg += '<td><a href="http://en.wikisource.org/wiki/Special:Contributions/Zachary">Contribs</a></td>';
msg += '<td><a href="http://en.wikiversity.org/wiki/Special:Contributions/Zachary">Contribs</a></td>';
msg += '</tr>';
msg += '</table>';
jsMsg(msg);
document.getElementById('ca-message').setAttribute('onClick', "hideCustomMessage()");
}
function hideCustomMessage() {
var ms = document.getElementById('mw-js-message');
ms.parentNode.removeChild(ms);
document.getElementById('ca-message').setAttribute('onClick', "showCustomMessage()");
}