|
|
(48 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| // Create portlet link
| |
| var portletLink = mw.util.addPortletLink( 'p-cactions', ' ',
| |
| 'My new portlet link', 'ca-my-portlet', 'Click here to test the new portlet'
| |
| );
| |
| // Bind click handler
| |
| (portletLink).click( function( e ) {
| |
| e.preventDefault();
| |
| // doSomeStuff();
| |
| alert( 'Hi' );
| |
| });
| |
|
| |
|
| mw.loader.using('jquery', function () {
| |
| $('.username').append(wgUserName)
| |
| });
| |
| mw.loader.using('jquery', function () {
| |
| $('.usergroups').append(wgUserName)
| |
| });
| |