Skip to content

Commit b15fa79

Browse files
Version 1.18.3 change table arrows less bold and have initial up down arrow.
1 parent a339b12 commit b15fa79

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

browser-extensions/chrome/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"author": "Lee Wannacott",
44
"name": "table-sort-js",
5-
"version": "1.18.2",
5+
"version": "1.18.3",
66
"description": "Makes tables sortable using table-sort-js: https://github.com/LeeWannacott/table-sort-js",
77
"icons": { "48": "icons/t.png" },
88
"browser_action": {
2 Bytes
Binary file not shown.

browser-extensions/chrome/table-sort.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
383383
return sortAscending(b, a);
384384
}
385385

386-
function clearArrows(arrowUp = "▲", arrowDown = "▼") {
386+
function clearArrows(arrowUp, arrowDown, initialArrow = "↕") {
387+
th.innerHTML = th.innerHTML.replace(initialArrow, "");
387388
th.innerHTML = th.innerHTML.replace(arrowUp, "");
388389
th.innerHTML = th.innerHTML.replace(arrowDown, "");
389390
}
@@ -515,13 +516,12 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
515516
columnIndexesClicked
516517
) {
517518
const desc = th.classList.contains("order-by-desc");
518-
const arrow = { up: " ▲", down: " ▼" };
519+
const initialArrow = " ↕";
520+
const arrow = { up: " ↑", down: " ↓" };
519521
const fillValue = "!X!Y!Z!";
520522

521-
if (desc && table.hasClass.tableArrows) {
522-
th.insertAdjacentText("beforeend", arrow.down);
523-
} else if (table.hasClass.tableArrows) {
524-
th.insertAdjacentText("beforeend", arrow.up);
523+
if (table.hasClass.tableArrows) {
524+
th.insertAdjacentText("beforeend", initialArrow);
525525
}
526526

527527
let timesClickedColumn = 0;

browser-extensions/firefox/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 2,
33
"author": "Lee Wannacott",
44
"name": "table-sort-js",
5-
"version": "1.18.2",
5+
"version": "1.18.3",
66
"description": "Makes tables sortable using table-sort-js: https://github.com/LeeWannacott/table-sort-js",
77
"icons": { "48": "icons/t.png" },
88
"browser_action": {
2 Bytes
Binary file not shown.

browser-extensions/firefox/table-sort.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
383383
return sortAscending(b, a);
384384
}
385385

386-
function clearArrows(arrowUp = "▲", arrowDown = "▼") {
386+
function clearArrows(arrowUp, arrowDown, initialArrow = "↕") {
387+
th.innerHTML = th.innerHTML.replace(initialArrow, "");
387388
th.innerHTML = th.innerHTML.replace(arrowUp, "");
388389
th.innerHTML = th.innerHTML.replace(arrowDown, "");
389390
}
@@ -515,13 +516,12 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
515516
columnIndexesClicked
516517
) {
517518
const desc = th.classList.contains("order-by-desc");
518-
const arrow = { up: " ▲", down: " ▼" };
519+
const initialArrow = " ↕";
520+
const arrow = { up: " ↑", down: " ↓" };
519521
const fillValue = "!X!Y!Z!";
520522

521-
if (desc && table.hasClass.tableArrows) {
522-
th.insertAdjacentText("beforeend", arrow.down);
523-
} else if (table.hasClass.tableArrows) {
524-
th.insertAdjacentText("beforeend", arrow.up);
523+
if (table.hasClass.tableArrows) {
524+
th.insertAdjacentText("beforeend", initialArrow);
525525
}
526526

527527
let timesClickedColumn = 0;

npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "table-sort-js",
3-
"version": "1.18.2",
3+
"version": "1.18.3",
44
"description": "A JavaScript client-side HTML table sorting library with no dependencies required.",
55
"license": "MIT",
66
"repository": "LeeWannacott/table-sort-js",

npm/table-sort.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
383383
return sortAscending(b, a);
384384
}
385385

386-
function clearArrows(arrowUp = "▲", arrowDown = "▼") {
386+
function clearArrows(arrowUp, arrowDown, initialArrow = "↕") {
387+
th.innerHTML = th.innerHTML.replace(initialArrow, "");
387388
th.innerHTML = th.innerHTML.replace(arrowUp, "");
388389
th.innerHTML = th.innerHTML.replace(arrowDown, "");
389390
}
@@ -515,13 +516,12 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
515516
columnIndexesClicked
516517
) {
517518
const desc = th.classList.contains("order-by-desc");
518-
const arrow = { up: " ▲", down: " ▼" };
519+
const initialArrow = " ↕";
520+
const arrow = { up: " ↑", down: " ↓" };
519521
const fillValue = "!X!Y!Z!";
520522

521-
if (desc && table.hasClass.tableArrows) {
522-
th.insertAdjacentText("beforeend", arrow.down);
523-
} else if (table.hasClass.tableArrows) {
524-
th.insertAdjacentText("beforeend", arrow.up);
523+
if (table.hasClass.tableArrows) {
524+
th.insertAdjacentText("beforeend", initialArrow);
525525
}
526526

527527
let timesClickedColumn = 0;

0 commit comments

Comments
 (0)