Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adds a header with a link to the moderator tools in the new topbar review menu
// ==UserScript==
// @name SO Topbar Review Dialog Tools
// @namespace http://tinygiant.io
// @version 1.0.0.0
// @description Adds a header with a link to the moderator tools in the new topbar review menu
// @author @TinyGiant
// @include /^https?:\/\/(?!chat)\w*.?(stackexchange.com|stackoverflow.com|serverfault.com|superuser.com|askubuntu.com|stackapps.com|mathoverflow.net)\/.*/
// @grant none
// ==/UserScript==
/* jshint esnext: true */
(function() {
'use strict';
const open = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function(...args) {
this.addEventListener('load', event => {
if(!/topbar\/review/.test(event.target.responseURL)) return;
document.querySelector('.review-dialog').insertAdjacentHTML('afterbegin', `
<div class="header">
<h3>Review</h3>
<span class="pull-right"><a href="//stackoverflow.com/tools">tools</a></span>
</div>
`);
}, false);
open.apply(this, args);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.