For faster navigation, this Iframe is preloading the Wikiwand page for User:Joeytje50/JWB/feed.js.

User:Joeytje50/JWB/feed.js

/** <nowiki>This script generates a list of most recent edits for each of the relevant pages for JWB.
 * This is used to check most recent changes, and whether the git repo needs updating.
 * The git repo is located at https://github.com/Joeytje50/JWB.
 * If you want to use this script as well (idk why but okay), you can install it using:

((subst:lusc|User:Joeytje50/JWB.js/load.js))

 * This script is not a subpage of JWB.js because it doesn't affect the actual JWB script itself.
 * </nowiki>
 */
 
if (mw.config.get('wgPageName') === 'User:Joeytje50/JWB') {
	window.JWB = {
		imports: {i18n: {)),
		messages: {},
	};
	$(function() {
		var feed = $('#JWB-feed');
		function getJWBFeed() {
			feed.closest('table').show();
			feed.html('<table class="wikitable"><caption style="cursor:pointer;">JWB recent changes</caption><tr><th>Title</th><th>User</th><th>Date</th><th>Summary</th></tr></table>');
			var table = feed.find('table.wikitable')
							.append('<tr><th colspan="10"><a href="https://github.com/Joeytje50/JWB" target="_blank">Github repo</a></th></tr>');
			var api = new mw.Api();
			api.get({
				action: 'query',
				prop: 'revisions',
				format: 'json',
				titles: ['User:Joeytje50/JWB',
					'User:Joeytje50/JWB/Changelog',
					'User:Joeytje50/JWB.js',
					'User:Joeytje50/JWB.css',
					'User:Joeytje50/JWB.js/load.js',
					'User:Joeytje50/JWB.js/i18n.js',
					'User:Joeytje50/JWB.js/worker.js',
					'User:Joeytje50/RETF.js',
					'User:Joeytje50/RETF'],
				rvprop: ['timestamp', 'user', 'parsedcomment', 'ids']
			}).done(function(data) {
				var pages = data.query.pages;
				for (var id in pages) {
					var rev = pages[id].revisions[0];
					var row = $('<tr></tr>').appendTo(table);
					row.append('<td><a href="/wiki/'+pages[id].title+'?action=raw">'+pages[id].title+'</a></td>')
					   .append('<td><a href="/wiki/User:'+rev.user+'">'+rev.user+'</a></td>')
					   .append('<td><a href="/w/index.php?diff='+rev.revid+'">'+(new Date(rev.timestamp)).toLocaleDateString("en-US", { year: 'numeric', month: 'long', day: 'numeric' })+'</a></td>')
					   .append('<td>'+rev.parsedcomment+'</td>');
				}
			});
		}
		getJWBFeed();
		table.find('caption').attr('title', 'Refresh').click(getJWBFeed);
	});
	$.getScript('//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/i18n.js&action=raw&ctype=text/javascript', function() {
		var langs = [];
		var codes = [];
		for (let lang in JWB.imports.i18n) {
			langs.push(JWB.imports.i18n[lang]);
			codes.push(lang);
		}
		$.when.apply($, langs.map(url => $.getScript(url))).done(function() {
			// loaded all i18n files. Check which messages are missing.
			var feed = $('#JWB-feed');
			var langtbl = $('<table class="wikitable"><tr><th>Code</th><th colspan="2">Missing messages</th></tr></table>');
			var missing = {};
			for (var c of codes) {
				missing[c] = [];
				for (var msg in JWB.messages.en) {
					if (JWB.messages[c][msg] === undefined) {
						missing[c].push(msg);
					}
				}
				if (missing[c].length === 0) continue;
				langtbl.append('<tr><td rowspan="'+missing[c].length+'"><code><a href="/wiki/User:Joeytje50/JWB.js/i18n-'+c+'.js">'+c+'</a></code></td>' + missing[c].reduce((acc, cur) => {
					if (acc.length) { // don't open a new <tr> if this is the first missing message.
						acc += '<tr>';
					}
					return acc + '<td><code>' + cur + '</code></td><td>' + JWB.messages.en[cur] + '</td></tr>';
				}, '')); // initialValue = '' to start off with an empty string.
			}
			feed.append(langtbl);
		});
	});
}
{{bottomLinkPreText}} {{bottomLinkText}}
User:Joeytje50/JWB/feed.js
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 ๐ŸŽ‰! the new version arrives on September 1st! Don't want to wait?