As an anonymous user, you can only add new data. If you would like to also modify existing data, please create an account and indicate your languages on your user page.

Help:Customizing Javascript

From OmegaWiki
Jump to: navigation, search

Adding a new definition without having to edit the entire page[edit]

And without having to go to the bottom of the page ;)

Add this to your common.js:

// "Add new DM" tab on expression pages
if ( wgCanonicalNamespace == 'Expression' ) {
 // Add a link to the actions menu to Special:Log for this page.
 addPortletLink( 'p-cactions', wgArticlePath.replace( '$1', 'index.php?title=' + encodeURIComponent(wgPageName) + '&action=edit&explang=-1' ), 'Add New DM');

!!: When you save, it'll look as if the definition disappear. It is because this is a dirty hack. Go to the word you added, it should be there.

Deleting an entire page with one click[edit]

Add this to your common.js:

importScript ('User:Kipcool/common.js/deleteall.js');