feature : persistent sort
This commit is contained in:
@@ -70,9 +70,29 @@
|
||||
}
|
||||
}
|
||||
|
||||
function hideNativeSort() {
|
||||
// Only when our persistent-sort control is present (the tweak is on); otherwise leave the
|
||||
// native fa-sort menu alone.
|
||||
if (!document.querySelector(".organontweaks-sort")) {
|
||||
return;
|
||||
}
|
||||
|
||||
var sorts = document.querySelectorAll("#board .fa-sort");
|
||||
|
||||
for (var i = 0; i < sorts.length; i++) {
|
||||
var dd = sorts[i].closest(".dropdown");
|
||||
|
||||
// Skip our own control (its OFF-state icon is also fa-sort).
|
||||
if (dd && !dd.classList.contains("organontweaks-sort")) {
|
||||
dd.style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function apply() {
|
||||
relocateColumnMenuItems();
|
||||
repositionCommentIcons();
|
||||
hideNativeSort();
|
||||
}
|
||||
|
||||
function init() {
|
||||
|
||||
Reference in New Issue
Block a user