User:Snipre/monobook.js

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.
function SortMyStatementsMoveToTop($sk, prop) {
	$('.wb-claim-section-P' + prop).prependTo($sk).css('border','1px solid limegreen');
	return false;
}
function SortMyStatements(statementarray) {
	var $sk = $('.wb-claim-section').filter(':first').parents('.wb-claims').filter(':first');
	for (var ii=statementarray.length-1; ii>=0; ii--) {
		SortMyStatementsMoveToTop($sk, statementarray[ii]);
	}
	return false;
}
function MyPreferredOrderOfStatements() {
	var so = [];
	so.push(231); // CAS
	so.push(232); // EINECS
	so.push(662); // PubChem
	so.push(683); // chEBI
	so.push(233); // SMILES
	so.push(234); // InchI
	so.push(235); // InchIKey
	// Terms/Biology
	so.push(225); // taxon name
	so.push(105); // taxon rank
	so.push(171); // parent taxon
	so.push(405); // taxon author
	so.push(574); // date of scientific description
	so.push(183); // endemic to
	// Navigation - bottom-up
	so.push(31); // instance of
	so.push(279); // subclass of
	so.push(361); // part of
	so.push(360); // is a list of
	// Navigation - lateral
	so.push(155); // preceded by
	so.push(156); // succeeded by
	so.push(460); // said to be the same as
	so.push(461); // opposite of
	so.push(301); // category's main topic
	so.push(910); // topic's main category
	// Terms/Generic
	so.push(127); // owned by
	so.push(138); // named after
	so.push(790); // approved by 
	so.push(91); // discoverer/inventor
	// Terms/Generic/Top down
	so.push(527); // has part
	// Terms/Person
	so.push(21); // sex
	so.push(101); // field of work
	so.push(106); // occupation
	so.push(27); // country of citizenship
	so.push(19); // place of birth
	so.push(20); // place of death
	so.push(463); // member of
	so.push(108); // employer
	so.push(39); // office held
	so.push(102); // member of political party
	so.push(54); // member of sports team
	so.push(53); // noble family
	so.push(512); // academic degree
	so.push(22); // father
	so.push(25); // mother
	so.push(7); // brother
	so.push(9); // sister
	so.push(26); // spouse
	so.push(451); // coinhabitant
	so.push(40); // child
	so.push(43); // stepfather
	so.push(44); // stepmother
	so.push(45); // grandparent
	// Organization
	so.push(112); // founder
	so.push(169); // chief executive officer
	so.push(488); // chairperson 
	so.push(159); // headquarters location
	so.push(452); // industry
	// Works/Generic
	so.push(144); // based on
	so.push(136); // genre
	so.push(179); // series
	so.push(364); // original language
	so.push(371); // presenter
	so.push(407); // language
	so.push(449); // original network
	so.push(495); // country of origin
	so.push(750); // distributor
	so.push(825); // dedicated to
	// Works/Art&Architecture
	so.push(170); // creator
	so.push(64); // architect
	so.push(466); // occupant
	so.push(88); // commissioner
	so.push(149); // architectural style
	so.push(180); // depicts
	so.push(186); // material used
	so.push(189); // discovery place
	so.push(195); // collection
	so.push(276); // moveable object location
	// Works/Literature
	so.push(50); // author
	so.push(655); // translator
	so.push(98); // editor
	so.push(110); // illustrator
	so.push(123); // publisher
	// Works/Music
	so.push(175); // performer/musical artist
	so.push(86); // composer
	so.push(162); // producer
	so.push(264); // record label
	so.push(676); // lyrics by
	// Works/Film
	so.push(57); // director
	so.push(58); // screenwriter
	so.push(344); // director of photography
	so.push(272); // production company
	// External links
	so.push(373); // Commons category
	// Do it.
	SortMyStatements(so);
	return false;
};
$(document).ready(function() {
	MyPreferredOrderOfStatements();
});