javascript: (async function() {
	var api = new mw.Api();
	var textbox = document.getElementById('wpTextbox1');

	var myPrefix = textbox.value.substring(0, textbox.selectionStart);
	var selectedText = textbox.value.substring(textbox.selectionStart, textbox.selectionEnd);
	var mySuffix = textbox.value.substring(textbox.selectionEnd);
	const RVLIMIT = 50;

	var username = '',
		timestamp = '';
	if (selectedText) {
		await api
			.get({
				action: 'query',
				format: 'json',
				prop: 'revisions',
				titles: mw.config.get('wgPageName'),
				utf8: 1,
				formatversion: '2',
				rvprop: 'ids|timestamp|user|content',
				rvslots: 'main',
				rvlimit: RVLIMIT,
			})
			.done(function(res) {
				var found = false;
				var revisions = res.query.pages[0].revisions;
				if (revisions[revisions.length - 1].slots.main.content.includes(selectedText)) {
					mw.notify('The text existed before ' + revisions.length + ' revisions', { type: 'error' });
					return;
				}
				for (let i = revisions.length - 2; i >= 0; i--) {
					if (revisions[i].slots.main.content.includes(selectedText)) {
						console.log(revisions[i])
						found = true;
						username = revisions[i].user;
						timestamp = revisions[i].timestamp;
						break;
					}
				}
				if (found) {
					mw.notify('Added by ' + username + ' at ' + timestamp);
				} else {
					mw.notify('The text is not found', { type: 'error' });
				}
			});
	}

	if (!username) {
		username = prompt('Username');
	}
	if (username !== '' && username !== null) {
		username = username.trim();
		textbox.value =
			myPrefix +
			selectedText +
			'{{subst:unsigned|' +
			username +
			'|' +
			new Morebits.date(timestamp).format('YYYY年M月D日 (ddd) HH:mm', 'utc') +
			' (UTC)}}' +
			mySuffix;
		var summary = '[[Template:Unsigned|補簽名]]';
		if (mw.util.isIPAddress(username)) {
			summary +=
				'[[User:' +
				username +
				'|' +
				username +
				']]（[[User talk:' +
				username +
				'|對話]]｜[[Special:Contributions/' +
				username +
				'|貢獻]]）';
		} else {
			summary += '[[Special:Contributions/' + username + '|' + username + ']]（[[User talk:' + username + '|留言]]）';
		}
		document.getElementById('wpSummary').value = summary;
		document.getElementById('wpMinoredit').click();

		var finish = function() {
			if (confirm('Save?')) {
				document.getElementById('wpSave').click();
			}
		};

		if (confirm('Notify ' + username + '?')) {
			var talkmessage = '== 您忘了簽名 ==\n{{subst:Uw-tilde|' + mw.config.get('wgPageName') + '}}--~~~~';
			var talksummary = '單層級通知：沒有在討論頁上簽名，於[[' + mw.config.get('wgPageName') + ']]';
			var talkpage = 'User_talk:' + username;

			api
				.edit(talkpage, function(revision) {
					return {
						text: revision.content + '\n\n' + talkmessage,
						summary: talksummary,
						nocreate: false,
					};
				})
				.then(
					function() {
						mw.notify('已通知');
						finish();
					},
					function(e) {
						if (e == 'nocreate-missing') {
							api
								.create(
									talkpage,
									{
										summary: talksummary,
									},
									talkmessage
								)
								.then(
									function() {
										mw.notify('已通知');
										finish();
									},
									function(e) {
										mw.notify('建立討論頁發生錯誤：' + e);
										finish();
									}
								);
						} else {
							mw.notify('編輯討論頁發生錯誤：' + e);
							finish();
						}
					}
				);
		} else {
			finish();
		}
	}
})();

@@ -385,16 +385,25 @@
 amp = ''
+,%0A%09%09revid
 ;%0A%09if (s
@@ -1096,40 +1096,8 @@
 ) %7B%0A
-%09%09%09%09%09%09console.log(revisions%5Bi%5D)%0A
 %09%09%09%09
@@ -1190,16 +1190,50 @@
 estamp;%0A
+%09%09%09%09%09%09revid = revisions%5Bi%5D.revid;%0A
 %09%09%09%09%09%09br
@@ -2135,16 +2135,102 @@
 %EF%BC%89';%0A%09%09%7D%0A
+%09%09if (revid) %7B%0A%09%09%09summary += ' rev %5B%5BSpecial:Diff/' + revid + '%7C' + revid + '%5D%5D';%0A%09%09%7D%0A
 %09%09docume
@@ -2326,16 +2326,61 @@
 click();
+%0A%09%09document.getElementById('wpDiff').click();
 %0A%0A%09%09var 

Add revid to summary