Filter discussions on scripts by review type and author via filter buttons, a hoverable dropdown menu or an autocomplete searchbox
< Feedback on GreasyFork - filter discussions on scripts by review type and author
Thanks for the contribution. I uploaded the modified script here
;-)
I re test your script ....
I think you can merge the both versions in one:
The tweak work with or without TS Citrus
I just merged them. Thanks.
Make it TS Citrus Gfork compatible....
I use [TS] Citrus GFork and to use your script with it i need add some tweaks:
line 72 :
function insertStatus() {
// CITRUS TWEAK
var p = document.querySelector('#script-content > h3:nth-child(1)') || document.querySelector('#script-content > h3:first-of-type') || document.querySelector('#user-discussions-on-scripts-written > header:nth-child(1) > h3:nth-child(1)'); // --- > working on Script discussions
if (p) {
var status = document.createElement('span');
status.className = 'filter-status';
p.appendChild(status);
}
}
line 93:
// CITRUS TWEAK
var k = document.querySelector('#script-content > h3:nth-child(1)') || document.querySelector('#script-content > h3:first-of-type') || document.querySelector('#control-panel > header:nth-child(1) > h3:nth-child(1)'); // --- > working on script discussions
k.appendChild(span);
}
line 232:
// CITRUS TWEAK
var parentElement = document.querySelector('#script-content > h3:nth-child(1)') || document.querySelector('#script-content > h3:first-of-type') || document.querySelector('#control-panel > header:nth-child(1) > h3:nth-child(1)');
var theFirstChild = parentElement.firstChild;
var div = document.createElement('div');
parentElement.insertBefore(div, theFirstChild);