| Line 1: |
Line 1: |
| − | mw.notify( $('<span>Welcome, Paul, your <a href="https://wiki.personaldata.io/wiki/User:Podehaye/common.js">user script</a> is loading!</span>') ); | + | mw.notify( $('<span>Welcome, Paul, your <a href="https://wiki.personaldata.io/wiki/User:Podehaye/common.js">user script on PersonalData.IO</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 | + | // mw.loader.load( '//wiki.personaldata.io/w/index.php?title=User:Podehaye/button.js&action=raw&ctype=text/javascript' ); // front button for testing |
| − | | + | // mw.loader.load( '//wiki.personaldata.io/w/index.php?title=User:Podehaye/store.js&action=raw&ctype=text/javascript' ); // storage form for testing |
| − | | + | // mw.loader.load( '//wiki.personaldata.io/w/index.php?title=User:Podehaye/mwhtml.js&action=raw&ctype=text/javascript' ); // mw.html test |
| − | | |
| − | // Button: | |
| − | mw.loader.using( 'oojs-ui-core' ).done( function () { | |
| − | $( function () {
| |
| − | var input = new OO.ui.TextInputWidget( {
| |
| − | placeholder: 'This is an entry box'
| |
| − | } );
| |
| − |
| |
| − | input.on( 'enter', function () {
| |
| − | // Check for duplicates and prevent empty input
| |
| − | } );
| |
| − | | |
| − | // Append the app widgets
| |
| − | $( '#mw-content-text' ).prepend(
| |
| − | input.$element);
| |
| − | | |
| − | } );
| |
| − | | |
| − | } );
| |