MediaWiki:Guidedtour-tour-chemwiki.js

From ChemWiki
Revision as of 17:58, 16 February 2024 by 127.0.0.1 (talk) (Added to the wiki via WikiImport-Script.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/*
 * Guided Tour to test guided tour features.
 */
// Copy the next line into the start of your tour.

( function ( window, document, $, mw, gt ) {
    
    tour = new gt.TourBuilder( {
        name: 'chemwiki'
    } );

    // Information defining each tour step
    tour.firstStep( {
        name: 'intro',
        title: 'Welcome',
        description: 'Welcome to the Introduction tour for MediaWiki',
        overlay: true
    } )
        .next( 'homebutton' );


    tour.step( {
        name: 'homebutton',
        title: 'Home Button',
        description: 'Here is the home buttton click here to return to the home page',
        attachTo: '#mw-navigation a',
        position: 'bottomRight',
        onShow: function() {
			
				gt.setTourCookie( 'chemwiki' , 'featmol' );
			 	gt.launchTourFromUserState();
			 },

        buttons: [{
            action: 'wikiLink',
            page: "Category:Homogeneous_photocatalytic_CO2_conversion",
            name: 'Link to Featured Molecues',
            type: 'progressive',
    }],
    } )
    // .next( 'feat_mol' )
    .back( 'intro' );
    
    tour.step( {
        name: 'feat_mol',
        title: 'Home Button',
        description: 'this is a test page',
        attachTo: '#mw-toc-heading',
        position: 'bottomRight',
        buttons: [{action: 'wikiLink',
            page: new_pagename,
            name: 'Link to Featured Molecues',
            type: 'progressive',
        }],
        } )
            .next( 'edit_trans' )
            .back( 'intro' );
   
// The following should be the last line of your tour.
} ( window, document, jQuery, mediaWiki, mediaWiki.guidedTour ) );