Difference between revisions of "User:Podehaye/common.js"
Jump to navigation
Jump to search
| Line 26: | Line 26: | ||
// Append the app widgets | // Append the app widgets | ||
$( '#mw-content-text' ).prepend( | $( '#mw-content-text' ).prepend( | ||
| + | "hello", | ||
| + | mw.cookie.get('my_wikiUserName' ), | ||
input.$element, | input.$element, | ||
info.$element | info.$element | ||
Revision as of 00:46, 18 May 2019
mw.notify( $('<span>Welcome, Paul, your <a href="https://wiki.personaldata.io/wiki/User:Podehaye/common.js">user script</a> is loading!</span>') );
mw.loader.load( '//wiki.personaldata.io/w/index.php?title=User:Podehaye/button.js&action=raw&ctype=text/javascript' ); // front button for testing
// Button:
mw.loader.using( 'oojs-ui-core' ).done( function () {
$( function () {
var input = new OO.ui.TextInputWidget( {
placeholder: 'This is an entry box'
} ),
info = new OO.ui.LabelWidget( {
label: 'Information',
classes: [ 'todo-info' ]
} );
info.setLabel( mw.cookie.get("UseDC"));
input.on( 'enter', function () {
mw.cookie.get('my_wikiUserName' );
});
// Append the app widgets
$( '#mw-content-text' ).prepend(
"hello",
mw.cookie.get('my_wikiUserName' ),
input.$element,
info.$element
);
} );
} );