User:The Transhumanist/ViewAnnotationToggler.js: Difference between revisions

Content deleted Content added
add test script by TheDJ
fix errors
Line 11:
// You CAN use it to do data processing, start requests to the api etc.
 
// AAn anonymous function block wrapped inside $()
$( function() {
// do stuff to change the page
Line 23:
 
// Attach a function to be run once the 'wikipage.content' part of a page is available
mw.hook( 'wikpagewikipage.content').add( function ($content ) {
// Like document.ready, this will run once that part of the page is
// ready/updated.
Line 35:
 
// mw, an alias for mediaWiki, is another javascript libary that is always
// available to MediaWiki and Wikipedia scripters.
// See also: https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw
// For the hook specific part of this library, which we use above, see:
Line 45:
// use ResourceLoader.
// See also: https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader#Client-side_.28dynamically.29
 
 
 
 
// Example