Global Review Summary v0.3: restore link to summary on review queue pages

This commit is contained in:
Glorfindel 2019-02-23 18:54:22 +01:00
parent 43eb9b7f25
commit 2a914f2638

View file

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name Stack Exchange Global Review Summary // @name Stack Exchange Global Review Summary
// @version 0.2 // @version 0.3
// @description Stack Exchange network wide review summary available in your network profile // @description Stack Exchange network wide review summary available in your network profile
// @author Glorfindel // @author Glorfindel
// @attribution Floern (https://github.com/Floern) // @attribution Floern (https://github.com/Floern)
@ -179,10 +179,13 @@ function showGlobalReviewSummaryLink() {
if (tabs != null) { if (tabs != null) {
tabs.appendChild(link); tabs.appendChild(link);
} else { } else {
var header = document.querySelector('#content .subheader'); let header = document.querySelector('#content h1.fs-headline1');
header.setAttribute('style', 'display: table'); let button = $(`<div class="pl8 grid--cell" role="navigation">
link.setAttribute('style', 'padding-left: 20px; display: table-cell; vertical-align: middle;'); <a href="//stackexchange.com/users/current?tab=reviews" class="d-inline-flex ai-center ws-nowrap s-btn s-btn__filled">
header.appendChild(link); Global Review Summary
</a>
</div>`);
button.insertAfter(header);
} }
} }