Skip to content

Commit b902179

Browse files
committed
release: v1.2.2
### Added - Help link in the options page, pointing at the monsender documentation. ### Fixed - Right-click sends the post, not the raw image file, when monloader's site list is unreachable. - Pairing prompt now points at monloader's monsender settings, where you approve the request.
1 parent a1a8ea1 commit b902179

10 files changed

Lines changed: 49 additions & 27 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [v1.2.2] - 2026-07-21
4+
### Added
5+
- Help link in the options page, pointing at the monsender documentation.
6+
### Fixed
7+
- Right-click sends the post, not the raw image file, when monloader's site list is unreachable.
8+
- Pairing prompt now points at monloader's monsender settings, where you approve the request.
9+
310
## [v1.2.1] - 2026-07-04
411
### Added
512
- Popup button to pause and resume monloader's downloads.

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# monsender
22

3-
A small firefox or chrome extension for [monloader](https://github.com/leqwin/monloader).
3+
A small firefox or chrome extension for [monloader](https://github.com/monbooru/monloader).
44
It sends the page you are looking at, a right-clicked image or video, or images you pick from a page scan to your monloader download queue, which pushes them into monbooru.
55

66
## Features
@@ -17,27 +17,32 @@ monsender is a companion browser extension for monloader. It hands the page you'
1717
```mermaid
1818
flowchart LR
1919
web["- Any booru or gallery supported by gallery-dl<br/>- Direct image URL"]
20+
ptr["Hydrus<br/>Public Tag Repository"]
2021
sender(["<b>monsender</b><br/>browser extension"])
2122
loader["<b>monloader</b><br/>downloader"]
2223
booru["<b>monbooru</b><br/>Your self-hosted booru"]
2324
2425
web -->|browse| sender
25-
sender -->|REST API| loader
26-
web -.->|paste URL| loader
27-
loader -->|REST API| booru
26+
sender -->|send URL| loader
27+
web -->|paste URL| loader
28+
loader -->|push images, tags, source| booru
29+
30+
booru -.->|lookup by hash| loader
31+
loader -.->|reverse lookup: md5 + similarity| web
32+
ptr <-.->|"sync: sha256 tags + aliases + implications<br/>contribute back (planned)"| loader
2833
2934
classDef hub fill:#5c6bc0,stroke:#9fa8da,stroke-width:3px,color:#ffffff;
3035
classDef tool fill:#16161c,stroke:#5c6bc0,stroke-width:1.5px,color:#c8c8c8;
3136
classDef src fill:#16161c,stroke:#8888a0,stroke-width:1px,color:#8888a0;
3237
3338
class sender hub;
3439
class loader,booru tool;
35-
class web src;
40+
class web,ptr src;
3641
```
3742

3843
- **monsender** : this application; sends the URL of the page you're currently browsing to monloader.
39-
- **[monloader](https://github.com/leqwin/monloader)** : downloader; fetches files and per-post metadata (via gallery-dl) and pushes them into a monbooru gallery over the REST API.
40-
- **[monbooru](https://github.com/leqwin/monbooru)** : self-hosted booru; organizes, tags, and serves your collection.
44+
- **[monloader](https://github.com/monbooru/monloader)** : downloader; fetches files and per-post metadata (via gallery-dl) and pushes them into a monbooru gallery over the REST API; also answers monbooru's reverse lookups (boorus, IQDB/SauceNAO, Hydrus PTR) and source refetches.
45+
- **[monbooru](https://github.com/monbooru/monbooru)** : self-hosted booru; organizes, tags, and serves your collection.
4146

4247
## Permissions
4348

@@ -50,7 +55,9 @@ runtime when you save settings.
5055

5156
<a href="https://addons.mozilla.org/en-US/firefox/addon/monsender/"><img alt="Get the Add-on" height="48" src="https://blog.mozilla.org/addons/files/2020/04/get-the-addon-fx-apr-2020.svg"></a>
5257

53-
Open the extension's options and set your monloader URL and token.
58+
Open the extension's options, set your monloader URL, and click **connect to monloader**; approve the pairing request in monloader under **Settings -> monsender** (needs monloader v1.2.0 or newer).
59+
60+
See the [monsender documentation](https://monbooru.github.io/mondocs/addons/monsender/index.html) for help.
5461

5562
## Build
5663

REPOSITORY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/leqwin/monsender
1+
https://github.com/monbooru/monsender

VERSION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.2.1
1+
v1.2.2

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "monsender",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "Send the current page or its images to your monloader download queue.",
55
"private": true,
66
"type": "commonjs",
@@ -24,6 +24,6 @@
2424
"license": "AGPL-3.0-or-later",
2525
"repository": {
2626
"type": "git",
27-
"url": "https://github.com/leqwin/monsender"
27+
"url": "https://github.com/monbooru/monsender"
2828
}
2929
}

src/bg.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,18 @@ function setupMenus() {
126126
browser.runtime.onInstalled.addListener(setupMenus);
127127
browser.runtime.onStartup.addListener(setupMenus);
128128

129-
// A direct-file link classifies as 'image', not 'supported', so it loses to the
130-
// page - the raw file never wins over the post URL that would carry tags. When
131-
// monloader is unset or the sites list is undecidable, fall through to the
132-
// pointed file, which is always sendable.
129+
// Prefer a linked post, then the page, over the raw file, which carries no tags.
130+
// A file link ('image') and a positively unlisted host ('unknown') lose to the
131+
// file; a 'blind' result (no sites list) does not - if the page is a booru its
132+
// file is likely an unfetchable CDN link, and if not, monloader judges it. With
133+
// monloader unset or nothing better pointed at, the raw file.
133134
async function resolveMenuTarget(cfg, info) {
134135
if (cfg.baseUrl) {
135-
if (info.linkUrl && (await ML.sites.sendKind(cfg, info.linkUrl)) === 'supported') return info.linkUrl;
136-
if (info.pageUrl && (await ML.sites.sendKind(cfg, info.pageUrl)) === 'supported') return info.pageUrl;
136+
for (const cand of [info.linkUrl, info.pageUrl]) {
137+
if (!cand) continue;
138+
const kind = await ML.sites.sendKind(cfg, cand);
139+
if (kind === 'supported' || kind === 'blind') return cand;
140+
}
137141
}
138142
return info.srcUrl;
139143
}

src/lib/sites.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
const r = await api.listSites(cfg);
4646
const data = (r && r.ok && r.data) || {};
4747
const sites = Array.isArray(data) ? data : (data.sites || []);
48-
listCache = { baseUrl, at: now, sites };
48+
// A failed or empty fetch is not cached, so a transient miss does not stick
49+
// for the TTL and blind every send in that window.
50+
if (sites.length) listCache = { baseUrl, at: now, sites };
4951
return sites;
5052
}
5153

@@ -54,17 +56,17 @@
5456
return matchHost(await fetchSites(cfg), url);
5557
}
5658

57-
// Classify a URL for the popup send gate: 'image' (a direct file, no tags),
59+
// Classify a URL for the send gate: 'image' (a direct file, no tags),
5860
// 'supported' (an example host matched, so tags come), 'unsupported' (no host
59-
// at all - nothing to enqueue), or 'unknown'. A host that matches no example
60-
// is 'unknown', not 'unsupported': an extractor can cover hosts its single
61-
// example does not name, so support is undecidable - leave it to the job
62-
// outcome rather than block on a guess.
61+
// at all - nothing to enqueue), 'blind' (no sites list to consult), or
62+
// 'unknown' (a fetched list that just does not name the host). 'unknown' and
63+
// 'blind' are both undecidable, but callers treat them apart: an unlisted host
64+
// loses to the raw file, a blind one does not.
6365
async function sendKind(cfg, url) {
6466
if (urls.isImageUrl(url)) return 'image';
6567
if (!hostOf(url)) return 'unsupported';
6668
const list = await fetchSites(cfg);
67-
if (!list.length) return 'unknown';
69+
if (!list.length) return 'blind';
6870
return matchHost(list, url) ? 'supported' : 'unknown';
6971
}
7072

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "monsender",
4-
"version": "1.2.1",
4+
"version": "1.2.2",
55
"description": "Send the current page or its images to your monloader download queue.",
66
"permissions": ["activeTab", "scripting", "storage", "contextMenus"],
77
"optional_host_permissions": ["http://*/*", "https://*/*"],

src/options/options.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
body { max-width: 680px; margin: 0 auto; padding: 16px; }
99
header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
1010
header strong { font-size: 16px; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; }
11+
header .help-link { margin-left: auto; }
1112
</style>
1213
</head>
1314
<body>
1415
<header>
1516
<img src="../assets/logo.png" class="logo" alt="" />
1617
<strong>monsender</strong><span class="muted small">settings</span>
18+
<a class="muted small help-link" href="https://monbooru.github.io/mondocs/addons/monsender/index.html" target="_blank" rel="noopener">help</a>
1719
</header>
1820

1921
<div class="section">

src/options/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
setFlash((r.data && r.data.error) || (r.networkError ? 'monloader unreachable' : 'pairing request failed'), 'flash-err');
110110
return;
111111
}
112-
setFlash('approve the request in monloader (settings → authentication), waiting...', 'flash-warn');
112+
setFlash('approve the request in monloader (settings -> monsender), waiting...', 'flash-warn');
113113
const id = r.data.request_id;
114114
for (let i = 0; i < 60; i++) {
115115
await sleep(1500);

0 commit comments

Comments
 (0)