Difference between revisions of "User:Podehaye/common.js"

From Wikibase Personal data
Jump to navigation Jump to search
(Created page with "mw.loader.using( 'oojs-ui-core' ).done( function () { $( function () { var button = new OO.ui.ButtonWidget( { label: 'Click me!' } ); button.on( 'click', function () {...")
 
 
(58 intermediate revisions by the same user not shown)
Line 1: Line 1:
mw.loader.using( 'oojs-ui-core' ).done( function () {
+
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>') );
$( function () {
+
 
var button = new OO.ui.ButtonWidget( { label: 'Click me!' } );
+
// mw.loader.load( '//wiki.personaldata.io/w/index.php?title=User:Podehaye/button.js&action=raw&ctype=text/javascript' ); // front button for testing
button.on( 'click', function () {
+
// mw.loader.load( '//wiki.personaldata.io/w/index.php?title=User:Podehaye/store.js&action=raw&ctype=text/javascript' ); // storage form for testing
alert( 'You clicked the button!' );
+
// mw.loader.load( '//wiki.personaldata.io/w/index.php?title=User:Podehaye/mwhtml.js&action=raw&ctype=text/javascript' ); // mw.html test
} );
 
$( '#mw-content-text' ).append( button.$element );
 
} );
 
} );
 

Latest revision as of 13:29, 24 January 2020

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/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