Skip to content

Commit

Permalink
Add list-modifiers string
Browse files Browse the repository at this point in the history
  • Loading branch information
AlttiRi committed Sep 7, 2024
1 parent 301f5e3 commit ec10447
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions dist/href-taker.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name HrefTaker
// @version 0.14.1-2024.9.7-2c02
// @version 0.14.2-2024.9.7-67bc
// @namespace gh.alttiri
// @description URL grabber popup
// @license GPL-3.0
Expand Down Expand Up @@ -711,8 +711,10 @@ function getListHelper(container, settings) {

const joinedUrls = [...new Set(urls)].sort().join(" ");
const hexes = Math.abs(hashString(joinedUrls)).toString(16).slice(-8).padStart(8, "0");
const modifiers = settings.sort ? "-S" : settings.hostname_sort ? "-HS" : "";
const title = `title="RMB click to temporary toggle Unsearchable option"`;
headerElem.innerHTML = `<span class="header-content" ${title}>Result list (${urls.length})</span> <span class="urls-hash">#${hexes.toUpperCase()}</span>`;
headerElem.innerHTML = `<span class="header-content" ${title}>Result list (${urls.length})</span> <span class="urls-hash"
>#${hexes.toUpperCase()}</span><span class="list-modifiers">${modifiers}</span>`;

const anchorAttr = `class="url-item-link" target="_blank" rel="noreferrer noopener"`;
let resultHtml = "";
Expand Down Expand Up @@ -1840,7 +1842,7 @@ input[disabled] {
color: gray;
}
.urls-hash {
.urls-hash, .list-modifiers {
color: gray;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "href-taker",
"private": true,
"version": "0.14.1-2024.9.7-2c02",
"version": "0.14.2-2024.9.7-67bc",
"type": "module",
"scripts": {
"dev": "vite --open demo.html --host",
Expand Down
4 changes: 3 additions & 1 deletion src/components/list-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ export function getListHelper(container, settings) {

const joinedUrls = [...new Set(urls)].sort().join(" ");
const hexes = Math.abs(hashString(joinedUrls)).toString(16).slice(-8).padStart(8, "0");
const modifiers = settings.sort ? "-S" : settings.hostname_sort ? "-HS" : "";
const title = `title="RMB click to temporary toggle Unsearchable option"`;
headerElem.innerHTML = `<span class="header-content" ${title}>Result list (${urls.length})</span> <span class="urls-hash">#${hexes.toUpperCase()}</span>`;
headerElem.innerHTML = `<span class="header-content" ${title}>Result list (${urls.length})</span> <span class="urls-hash"
>#${hexes.toUpperCase()}</span><span class="list-modifiers">${modifiers}</span>`;

const anchorAttr = `class="url-item-link" target="_blank" rel="noreferrer noopener"`;
let resultHtml = "";
Expand Down
2 changes: 1 addition & 1 deletion src/components/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ input[disabled] {
color: gray;
}
.urls-hash {
.urls-hash, .list-modifiers {
color: gray;
}
Expand Down

0 comments on commit ec10447

Please sign in to comment.