Difference between revisions of "MediaWiki:WikiLove.js"

From PCBWiki
Jump to navigation Jump to search
Line 5: Line 5:
delete $.wikiLoveOptions.types.barnstar;
delete $.wikiLoveOptions.types.barnstar;
delete $.wikiLoveOptions.types.food;
delete $.wikiLoveOptions.types.food;
 




Line 11: Line 11:
types: {
types: {
'barnstar': {
'barnstar': {
      name: mw.msg( 'wikilove-type-barnstars' ), // name of the type (appears in the types menu)
      name: mw.msg( 'wikilove-type-barnstars' ), // name of the type (appears in the types menu)
      select: mw.msg( 'wikilove-barnstar-select' ), // subtype select label
      select: mw.msg( 'wikilove-barnstar-select' ), // subtype select label
      subtypes: { // some different subtypes
      subtypes: { // some different subtypes
        // note that when not using subtypes you should use these subtype options
        // note that when not using subtypes you should use these subtype options
        // for the top-level type
        // for the top-level type
        'diamond': {
        'diamond': {
          fields: [ 'message' ], // fields to ask for in form
          fields: [ 'message' ], // fields to ask for in form
          option: "Diamond", // option listed in the select list
          option: "Diamond", // option listed in the select list
          descr: "Diamonds are one of the rarest and most recognizable materials in Minecraft." // description
          descr: "Diamonds are one of the rarest and most recognizable materials in Minecraft." // description
          image: 'Diamond.png' // image for the award
          image: 'Diamond.png' // image for the award
      }
      }
  },
            icon: 'http://hydra-media.cursecdn.com/minecraft.gamepedia.com/c/c5/Grass.png' // icon for left-side menu
      icon: 'http://hydra-media.cursecdn.com/minecraft.gamepedia.com/c/c5/Grass.png' // icon for left-side menu
 
  }
},
}
  }
}
});
});



Revision as of 21:44, 18 December 2015

( function ( $ ) {
	'use strict';

	delete $.wikiLoveOptions.types.kitten;
	delete $.wikiLoveOptions.types.barnstar;
	delete $.wikiLoveOptions.types.food;



	$.extend(true, $.wikiLoveOptions, {
		types: {
			'barnstar': {
		      name: mw.msg( 'wikilove-type-barnstars' ), // name of the type (appears in the types menu)
		      select: mw.msg( 'wikilove-barnstar-select' ), // subtype select label
		      subtypes: { // some different subtypes
		        // note that when not using subtypes you should use these subtype options
		        // for the top-level type
		        'diamond': {
		          fields: [ 'message' ], // fields to ask for in form
		          option: "Diamond", // option listed in the select list
		          descr: "Diamonds are one of the rarest and most recognizable materials in Minecraft." // description
		          image: 'Diamond.png' // image for the award
		      }
		            		icon: 'http://hydra-media.cursecdn.com/minecraft.gamepedia.com/c/c5/Grass.png' // icon for left-side menu

 			},
  		}
	}	
});

	var bst = $.wikiLoveOptions.types.barnstar.subtypes,
	del_bst = function (what) {
		if (bst[what]) {
			delete bst[what];
		}
	};

	del_bst('writers');
	del_bst('editors');
	del_bst('copyeditor');
	del_bst('citation');

}( jQuery ) );
//</nowiki>