My Wikipedia Edits

I’ve had a Wikipedia account since way back in 2005, and since then I’ve made edits to quite a few pages - mostly small edits, such as fixing typos.

Below is a list of the Wikipedia pages I’ve edited, under the username Markhoney, which is pulled live from the Wikipedia server. The list is interesting to me, as it mostly shows a subset of the pages on Wikipedia that I’ve read - a sample of pages where I’ve found grammar issues. This means it’s probably not a representative sample of all of the pages I’ve read, as it will likely skew towards lesser read pages, where other people haven’t already picked up on the issues I’ve fixed as there have been fewer visitors to the page.

Total Edits: 0

Unique Pages: 0

Page List

Vue component: embed/wikipedia.vue
<template>
	<div>
		<h3>Total Edits: {{edits.length}}</h3>
		<h3>Unique Pages: {{pages.length}}</h3>
		<h2>Page List</h2>
		<ul>
			<li v-for="page in pages">
				<a
					:href="'https://en.wikipedia.org/?curid=' + page.pageid"
					:title="page.comment"
				>{{page.title}}</a>
			</li>
		</ul>
	</div>
</template>


<script>
// https://www.mediawiki.org/wiki/API:Usercontribs
import axios from 'axios';

export default {
	data() {
		return {
			account: 'Markhoney',
			edits: [],
			pages: [],
			total: 0
		};
	},
	async mounted() {
		this.edits = (await axios.get(
			'https://en.wikipedia.org/w/api.php?action=query&list=usercontribs&format=json&origin=*&uclimit=500&ucuser=' + this.account
		)).data.query.usercontribs;
		this.pages = Object.values(
			this.edits.reduce((obj, item) => {
				if (!obj[item.title]) obj[item.title] = item;
				return obj;
			}, {})
		).sort((a, b) => a.title.localeCompare(b.title));
	}
};
</script>

<style scoped>
</style>