MediaWiki:Guidedtour-tour-wikidatabasics.js
Jump to navigation
Jump to search
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/**
* Guided tour to explain how to edit an item's label.
*
* @see https://www.mediawiki.org/wiki/Extension:GuidedTour/Write_an_on-wiki_tour
*
* @author Bene*
*/
( function( $, mw, gt, wb ) {
$.ajax( {
async: false,
url: mw.util.wikiScript() + '?title=MediaWiki:Guidedtour-lib.js&action=raw&ctype=text/javascript',
dataType: 'script'
} );
var tourName = 'wikidatabasics',
tourEntityId = 'Q16943273',
newData = {};
gt.init( tourName, tourEntityId, newData, {
/**
* The page from where the tour texts should be loaded.
*/
pageName: 'Wikidata:Tours/Wikidata basics',
/**
* The steps of the tour.
*/
steps: [ {
// Welcome
}, {
// The basic idea
}, {
// Labels
}, {
// Create a label
attachTo: '.wb-ui-labeledittool input',
overlay: '.wb-ui-labeledittool'
}, {
// Edit a label
attachTo: '.wb-ui-labeledittool .wikibase-toolbareditgroup-editbutton',
overlay: '.wb-ui-labeledittool'
}, {
// Descriptions
}, {
// Create and edit descriptions
attachTo: '.wb-ui-descriptionedittool input',
overlay: '.wb-ui-descriptionedittool'
}, {
// Aliases
}, {
// Create and edit aliases
attachTo: '.wb-ui-aliasesedittool .wb-ui-propertyedittool-toolbarbutton-addbutton',
overlay: '.wb-ui-aliasesedittool'
}, {
// Congratulations
} ]
} );
} )( jQuery, mediaWiki, mediaWiki.guidedTour, wikibase );