User:Emma/common.js: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
No edit summary
mNo edit summary
Line 4: Line 4:
);
);
// Bind click handler
// Bind click handler
$(portletLink).click( function( e ) {
(portletLink).click( function( e ) {
         e.preventDefault();
         e.preventDefault();
         // doSomeStuff();
         // doSomeStuff();
         alert( 'htmlspecialchars( trim( $row->user_real_name ) )' );
         alert( 'Hi' );
});
});



Revision as of 05:11, November 9, 2011

// 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)
});