Skip to content

Commit

Permalink
Version 1.18.3 change table arrows less bold and have initial up down…
Browse files Browse the repository at this point in the history
… arrow.
  • Loading branch information
LeeWannacott committed Dec 29, 2023
1 parent a339b12 commit b15fa79
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion browser-extensions/chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"author": "Lee Wannacott",
"name": "table-sort-js",
"version": "1.18.2",
"version": "1.18.3",
"description": "Makes tables sortable using table-sort-js: https://github.com/LeeWannacott/table-sort-js",
"icons": { "48": "icons/t.png" },
"browser_action": {
Expand Down
Binary file modified browser-extensions/chrome/table-sort-js.zip
Binary file not shown.
12 changes: 6 additions & 6 deletions browser-extensions/chrome/table-sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
return sortAscending(b, a);
}

function clearArrows(arrowUp = "▲", arrowDown = "▼") {
function clearArrows(arrowUp, arrowDown, initialArrow = "↕") {
th.innerHTML = th.innerHTML.replace(initialArrow, "");
th.innerHTML = th.innerHTML.replace(arrowUp, "");
th.innerHTML = th.innerHTML.replace(arrowDown, "");
}
Expand Down Expand Up @@ -515,13 +516,12 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
columnIndexesClicked
) {
const desc = th.classList.contains("order-by-desc");
const arrow = { up: " ▲", down: " ▼" };
const initialArrow = " ↕";
const arrow = { up: " ↑", down: " ↓" };
const fillValue = "!X!Y!Z!";

if (desc && table.hasClass.tableArrows) {
th.insertAdjacentText("beforeend", arrow.down);
} else if (table.hasClass.tableArrows) {
th.insertAdjacentText("beforeend", arrow.up);
if (table.hasClass.tableArrows) {
th.insertAdjacentText("beforeend", initialArrow);
}

let timesClickedColumn = 0;
Expand Down
2 changes: 1 addition & 1 deletion browser-extensions/firefox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"author": "Lee Wannacott",
"name": "table-sort-js",
"version": "1.18.2",
"version": "1.18.3",
"description": "Makes tables sortable using table-sort-js: https://github.com/LeeWannacott/table-sort-js",
"icons": { "48": "icons/t.png" },
"browser_action": {
Expand Down
Binary file modified browser-extensions/firefox/table-sort-js.zip
Binary file not shown.
12 changes: 6 additions & 6 deletions browser-extensions/firefox/table-sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
return sortAscending(b, a);
}

function clearArrows(arrowUp = "▲", arrowDown = "▼") {
function clearArrows(arrowUp, arrowDown, initialArrow = "↕") {
th.innerHTML = th.innerHTML.replace(initialArrow, "");
th.innerHTML = th.innerHTML.replace(arrowUp, "");
th.innerHTML = th.innerHTML.replace(arrowDown, "");
}
Expand Down Expand Up @@ -515,13 +516,12 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
columnIndexesClicked
) {
const desc = th.classList.contains("order-by-desc");
const arrow = { up: " ▲", down: " ▼" };
const initialArrow = " ↕";
const arrow = { up: " ↑", down: " ↓" };
const fillValue = "!X!Y!Z!";

if (desc && table.hasClass.tableArrows) {
th.insertAdjacentText("beforeend", arrow.down);
} else if (table.hasClass.tableArrows) {
th.insertAdjacentText("beforeend", arrow.up);
if (table.hasClass.tableArrows) {
th.insertAdjacentText("beforeend", initialArrow);
}

let timesClickedColumn = 0;
Expand Down
2 changes: 1 addition & 1 deletion npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "table-sort-js",
"version": "1.18.2",
"version": "1.18.3",
"description": "A JavaScript client-side HTML table sorting library with no dependencies required.",
"license": "MIT",
"repository": "LeeWannacott/table-sort-js",
Expand Down
12 changes: 6 additions & 6 deletions npm/table-sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
return sortAscending(b, a);
}

function clearArrows(arrowUp = "▲", arrowDown = "▼") {
function clearArrows(arrowUp, arrowDown, initialArrow = "↕") {
th.innerHTML = th.innerHTML.replace(initialArrow, "");
th.innerHTML = th.innerHTML.replace(arrowUp, "");
th.innerHTML = th.innerHTML.replace(arrowDown, "");
}
Expand Down Expand Up @@ -515,13 +516,12 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
columnIndexesClicked
) {
const desc = th.classList.contains("order-by-desc");
const arrow = { up: " ▲", down: " ▼" };
const initialArrow = " ↕";
const arrow = { up: " ↑", down: " ↓" };
const fillValue = "!X!Y!Z!";

if (desc && table.hasClass.tableArrows) {
th.insertAdjacentText("beforeend", arrow.down);
} else if (table.hasClass.tableArrows) {
th.insertAdjacentText("beforeend", arrow.up);
if (table.hasClass.tableArrows) {
th.insertAdjacentText("beforeend", initialArrow);
}

let timesClickedColumn = 0;
Expand Down

0 comments on commit b15fa79

Please sign in to comment.