User:Lee Carre/global.js

From Meta, a Wikimedia project coordination wiki

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.
window.LocalComments = {
	dateDifference: true,
	dateFormat: 'ymd',
	dayOfWeek: true,
	dropDays: 93,
	dropMonths: 24,
	timeFirst: false,
	twentyFourHours: true,
}; // [[:w:Wikipedia:Comments in Local Time]]

//importScript('User:Gary/comments in local time.js'); // [[User:Gary/comments in local time.js]]


window.LocalComments = $.extend(window.LocalComments, {
	formats: {
		day: function (then) { return then.fromNow(); },
		week: function (then) { return then.calendar(); },
		other: "LLL",
	},
	tooltipFormats: [
		function (then) { return then.fromNow(); },
		"LLLL",
		"YYYY-MM-DDTHH:mmZ",
	],
});

//mw.loader.load('//en.wikipedia.org/w/?title=User:Mxn/CommentsInLocalTime.js&action=raw&ctype=text/javascript'); // [[:w:en:User:Mxn/CommentsInLocalTime]]