Skip to content

Commit 727d9c7

Browse files
committed
Added support for more SamacSys websites
1 parent f198091 commit 727d9c7

8 files changed

Lines changed: 302 additions & 39 deletions

README.md

Lines changed: 114 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
Easy ECAD Downloader is a browser extension for exporting KiCad-compatible CAD assets from supported distributor product pages.
2828

29-
It works on supported JLCPCB, LCSC, Mouser, and Farnell part pages, and can download the available KiCad files for you: symbols, footprints, 3D models, and datasheets.
29+
It works on supported JLCPCB, LCSC, Mouser, Farnell, element14, and Newark part pages, and can download the available KiCad files for you: symbols, footprints, 3D models, and datasheets.
3030

3131
<p>
3232
<img src="docs/assets/readme/important-bar.svg" alt="" width="4" height="58" align="left" hspace="12">
@@ -52,12 +52,12 @@ It works on supported JLCPCB, LCSC, Mouser, and Farnell part pages, and can down
5252

5353
| Browser | Install from | Notes |
5454
|---|---|---|
55-
| Chrome, Edge, Brave, and other Chromium browsers | [Chrome Web Store](https://chromewebstore.google.com/detail/easyeda-downloader/egbkokdcahpjimldjjaobimnofbdnncb) | Full support for EasyEDA-backed pages and SamacSys-backed Mouser/Farnell downloads. |
56-
| Firefox | [Firefox Add-ons](https://addons.mozilla.org/en-GB/firefox/addon/easyeda-downloader/) | Works for EasyEDA-backed pages. SamacSys-backed Mouser/Farnell downloads need the optional Firefox relay setup. |
55+
| Chrome, Edge, Brave, and other Chromium browsers | [Chrome Web Store](https://chromewebstore.google.com/detail/easyeda-downloader/egbkokdcahpjimldjjaobimnofbdnncb) | Full support for EasyEDA-backed pages and SamacSys-backed Mouser/Farnell/element14/Newark downloads. |
56+
| Firefox | [Firefox Add-ons](https://addons.mozilla.org/en-GB/firefox/addon/easyeda-downloader/) | Works for EasyEDA-backed pages. SamacSys-backed Mouser/Farnell/element14/Newark downloads need the optional Firefox relay setup. |
5757

5858
## <img src="docs/assets/readme/icon-quick-start.svg" alt="" width="20" height="20" align="middle" style="vertical-align: -0.1em;"> Quick start
5959

60-
1. Open a supported JLCPCB, LCSC, Mouser, or Farnell component page.
60+
1. Open a supported JLCPCB, LCSC, Mouser, Farnell, element14, or Newark component page.
6161
2. Click the Easy ECAD Downloader extension icon.
6262
3. Review the detected manufacturer and source part details.
6363
4. Choose which assets to export.
@@ -68,7 +68,7 @@ It works on supported JLCPCB, LCSC, Mouser, and Farnell part pages, and can down
6868

6969
### 1. Open a supported component page
7070

71-
The content script detects supported part contexts from EasyEDA-backed JLCPCB/LCSC pages or SamacSys-backed Mouser/Farnell pages.
71+
The content script detects supported part contexts from EasyEDA-backed JLCPCB/LCSC pages or SamacSys-backed Mouser/Farnell/element14/Newark pages.
7272

7373
<p align="center">
7474
<img src="docs/assets/readme/SupportedPage.png" alt="Supported component page" width="760">
@@ -123,7 +123,7 @@ Downloads/
123123
| Source flow | Pages | Symbol | Footprint | 3D model | Datasheet | Notes |
124124
|---|---|---:|---:|---:|---:|---|
125125
| EasyEDA-backed | JLCPCB, LCSC | Yes | Yes | When available | When available | Uses the detected LCSC id and upstream EasyEDA payload. |
126-
| SamacSys-backed | Mouser, Farnell | Yes | Yes | When available | No | Downloads the upstream KiCad ZIP and repackages selected assets. |
126+
| SamacSys-backed | Mouser, Farnell, element14, Newark | Yes | Yes | When available | No | Downloads the upstream KiCad ZIP and repackages selected assets. |
127127

128128
## <img src="docs/assets/readme/icon-settings.svg" alt="" width="20" height="20" align="middle" style="vertical-align: -0.1em;"> Settings
129129

@@ -135,7 +135,7 @@ Downloads/
135135
|---|---|
136136
| `Save each file separately` | Switches between loose downloads and grouped KiCad library output. |
137137
| `KiCad library folder` | Sets the Downloads-relative folder used for library mode, such as `easyECADDownloader` or `KiCad/easyECAD`. |
138-
| `SamacSys username` and `SamacSys password` | Optional upstream sign-in details for Mouser/Farnell CAD ZIP downloads. |
138+
| `SamacSys username` and `SamacSys password` | Optional upstream sign-in details for Mouser/Farnell/element14/Newark CAD ZIP downloads. |
139139
| `Advanced Firefox settings` | Configures the user-managed Firefox relay URL and helper-service auth when SamacSys export is needed in Firefox. |
140140

141141
Password and token fields are blank when the settings page opens, and each field has a local show/hide button for checking typed values. New values are kept for the current browser session by default. Tick the relevant `Remember ... on this device` box only if you accept the risk of storing that secret in the browser profile.
@@ -153,38 +153,137 @@ For authenticated SamacSys ZIP downloads, upstream auth precedence is:
153153
<br>
154154

155155
<details>
156-
<summary><strong>Do I still need to check generated files?</strong></summary>
156+
<summary><strong>What does Easy ECAD Downloader do?</strong></summary>
157157

158158
<br>
159159

160-
Yes. Treat generated CAD files as a starting point, not as manufacturing-approved data. Always verify footprint dimensions, pin mapping, 3D model placement, and datasheet references.
160+
Easy ECAD Downloader is a browser extension for downloading KiCad-compatible ECAD assets from supported distributor pages. It helps export available symbols, footprints, 3D models, and datasheets from JLCPCB, LCSC, Mouser, Farnell, element14, and Newark product pages.
161161

162162
</details>
163163

164164
<details>
165-
<summary><strong>Why is a symbol, footprint, 3D model, or datasheet missing?</strong></summary>
165+
<summary><strong>Which websites does Easy ECAD Downloader support?</strong></summary>
166166

167167
<br>
168168

169-
The extension can only export data that is available from the source page or linked component metadata. Some parts may have incomplete or inconsistent source data.
169+
Easy ECAD Downloader supports JLCPCB, LCSC, Mouser, Farnell, element14, and Newark product pages. JLCPCB and LCSC use EasyEDA-backed component data, while Mouser, Farnell, element14, and Newark use SamacSys-backed CAD downloads.
170170

171171
</details>
172172

173173
<details>
174-
<summary><strong>Does SamacSys export work in Firefox?</strong></summary>
174+
<summary><strong>What KiCad files can Easy ECAD Downloader create?</strong></summary>
175175

176176
<br>
177177

178-
Yes, but Firefox needs an advanced user-managed relay URL for SamacSys distributor export. Chrome can request SamacSys ZIP assets directly through the normal browser session.
178+
Depending on the part and source data, Easy ECAD Downloader can create KiCad symbol libraries, footprint files, 3D model files, and datasheet PDFs. Common output files include `.kicad_sym`, `.kicad_mod`, `.pretty`, `.step`, `.wrl`, and PDF datasheets.
179179

180180
</details>
181181

182182
<details>
183-
<summary><strong>Where are files downloaded?</strong></summary>
183+
<summary><strong>Where are the downloaded KiCad files saved?</strong></summary>
184184

185185
<br>
186186

187-
By default, library-mode files are saved under `Downloads/easyECADDownloader/`. If `Save each file separately` is enabled, selected files are saved directly into the browser downloads folder.
187+
In library mode, Easy ECAD Downloader saves files into a KiCad-style library folder under your browser Downloads directory. By default, this is `Downloads/easyECADDownloader/`. The output is grouped into a symbol library, a `.pretty` footprint folder, a 3D models folder, and a datasheets folder when applicable. If `Save each file separately` is enabled, selected files are saved directly into the browser downloads folder.
188+
189+
</details>
190+
191+
<details>
192+
<summary><strong>Do I still need to check the downloaded symbol or footprint?</strong></summary>
193+
194+
<br>
195+
196+
Yes. Generated CAD assets should always be reviewed before manufacturing. Check pin mapping, pad numbering, footprint dimensions, polarity, orientation, courtyard and clearance assumptions, 3D model placement, and datasheet accuracy before ordering boards.
197+
198+
</details>
199+
200+
<details>
201+
<summary><strong>How do I import JLCPCB or EasyEDA footprints and symbols into KiCad easily?</strong></summary>
202+
203+
<br>
204+
205+
Open a supported JLCPCB or LCSC component page, click the Easy ECAD Downloader extension icon, preview the available assets, and download the KiCad output. The extension converts the available EasyEDA-backed component data into KiCad-compatible symbol, footprint, and 3D model files where those assets exist.
206+
207+
</details>
208+
209+
<details>
210+
<summary><strong>Can I download EasyEDA footprints for KiCad?</strong></summary>
211+
212+
<br>
213+
214+
Yes. For supported JLCPCB and LCSC pages, Easy ECAD Downloader downloads EasyEDA-backed component data and exports KiCad-compatible footprint files. When available, it can also export the matching symbol, 3D model, and datasheet.
215+
216+
</details>
217+
218+
<details>
219+
<summary><strong>How do I download JLCPCB footprints for KiCad?</strong></summary>
220+
221+
<br>
222+
223+
Find the supported JLCPCB or LCSC component page, open Easy ECAD Downloader, and download the available KiCad footprint. This avoids manually redrawing the land pattern when source CAD data is already available.
224+
225+
</details>
226+
227+
<details>
228+
<summary><strong>Can I convert an LCSC part number into a KiCad symbol, footprint, and 3D model?</strong></summary>
229+
230+
<br>
231+
232+
Yes, for supported LCSC or JLCPCB parts with available EasyEDA-backed data. Easy ECAD Downloader detects the part from the browser page and exports the available KiCad assets without requiring a command-line workflow.
233+
234+
</details>
235+
236+
<details>
237+
<summary><strong>Is Easy ECAD Downloader an EasyEDA to KiCad converter?</strong></summary>
238+
239+
<br>
240+
241+
Yes, for component-level library assets. Easy ECAD Downloader converts supported EasyEDA-backed component data into KiCad-compatible symbols, footprints, and 3D models. It is not a full EasyEDA project, schematic, or PCB-layout migration tool.
242+
243+
</details>
244+
245+
<details>
246+
<summary><strong>Can I download KiCad footprints from Mouser?</strong></summary>
247+
248+
<br>
249+
250+
Yes, when the Mouser product page provides supported ECAD data. Easy ECAD Downloader uses the Mouser and SamacSys CAD flow to download the available KiCad files and organize the selected symbol, footprint, and 3D model assets.
251+
252+
</details>
253+
254+
<details>
255+
<summary><strong>Can I download KiCad footprints from Farnell, element14, or Newark?</strong></summary>
256+
257+
<br>
258+
259+
Yes, when the Farnell, element14, or Newark product page links to supported SamacSys ECAD data. Easy ECAD Downloader can export the available KiCad symbol, footprint, and 3D model files from the supported download flow.
260+
261+
</details>
262+
263+
<details>
264+
<summary><strong>Is Easy ECAD Downloader a Library Loader alternative for KiCad?</strong></summary>
265+
266+
<br>
267+
268+
For supported JLCPCB, LCSC, Mouser, Farnell, element14, and Newark pages, yes. Easy ECAD Downloader can reduce the need for a separate Library Loader workflow by detecting the part page, downloading the available CAD assets, and organizing KiCad-compatible output. Library Loader may still be useful for unsupported distributors, unsupported parts, or non-KiCad workflows.
269+
270+
</details>
271+
272+
<details>
273+
<summary><strong>How do I add downloaded symbols and footprints to KiCad?</strong></summary>
274+
275+
<br>
276+
277+
Add the generated `.kicad_sym` file through KiCad's symbol library manager and add the generated `.pretty` folder through KiCad's footprint library manager. KiCad tracks symbol and footprint libraries separately, so add both if you downloaded both asset types.
278+
279+
</details>
280+
281+
<details>
282+
<summary><strong>Why is a KiCad symbol, footprint, 3D model, or datasheet missing?</strong></summary>
283+
284+
<br>
285+
286+
Easy ECAD Downloader can only export files that are available from the source page or linked component metadata. Some components have a footprint but no symbol, no 3D model, no datasheet, or incomplete upstream CAD data.
188287

189288
</details>
190289

docs/architecture-notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This file records short implementation notes that supplement, but do not replace
1111
- `src/service_worker_runtime.js`: provider routing, runtime gating, response shaping, and composition of worker dependencies
1212
- `src/core/*.js`: shared worker business logic for settings, downloads, storage-backed symbol-library handling, shared export artifact writing, and common normalization
1313
- `src/sources/*.js`: source adapters plus source-specific fetch/parse/export helpers
14-
- `src/sources/samacsys_distributor_adapter.js` is the shared backend adapter for Mouser and Farnell
14+
- `src/sources/samacsys_distributor_adapter.js` is the shared backend adapter for Mouser, Farnell, element14, and Newark
1515
- `src/sources/samacsys_common.js` holds the shared SamacSys preview, ZIP, relay-cookie, relay-auth, upstream-auth, direct-request ZIP-auth fallback, and asset-rewrite helpers
1616
- `src/kicad_converter.js`: stable public converter facade
1717
- `src/kicad/*.js`: EasyEDA parsing, KiCad text generation, shared conversion math, and OBJ-to-WRL conversion
@@ -29,7 +29,7 @@ This file records short implementation notes that supplement, but do not replace
2929

3030
- The popup does not fetch, extract, or convert CAD assets directly; it only requests that work.
3131
- The runtime/router owns provider branching, while source adapters own source-specific preview and export behavior.
32-
- Farnell does not have its own backend adapter file because it intentionally reuses the shared SamacSys distributor backend.
32+
- Farnell, element14, and Newark do not have their own backend adapter files because they intentionally reuse the shared SamacSys distributor backend.
3333
- Symbol library append behavior depends on `chrome.storage.local`, not on local filesystem reads.
3434
- Library-mode download paths remain relative to Downloads and are resolved from extension settings, not absolute filesystem paths.
3535
- SamacSys distributor support is still Chrome-first, but Firefox can opt into a user-managed relay through the advanced Firefox settings menu.

docs/firefox-samacsys-proxy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export default {
258258

259259
For the Worker code above, this should match the value stored in `PROXY_BEARER_TOKEN`.
260260
10. Leave `Remember helper password/token on this device` unticked unless you accept the local-storage risk.
261-
11. Reload the target Mouser or Farnell page.
261+
11. Reload the target Mouser, Farnell, element14, or Newark page.
262262
12. Test previews in Firefox first.
263263
13. If previews work, try ZIP export.
264264

@@ -267,4 +267,4 @@ export default {
267267
- This Porxy is intentionally restricted to `*.componentsearchengine.com` targets so it does not become a generic open proxy.
268268
- The current extension relay contract expects the proxy to expose the final upstream URL through `x-upstream-url`.
269269
- The extension sends porxy auth separately in the proxy request `Authorization` header.
270-
- The extension also forwards an explicit upstream SamacSys `Authorization` header in `headers.Authorization`, sourced from locally generated Basic auth.
270+
- The extension also forwards an explicit upstream SamacSys `Authorization` header in `headers.Authorization`, sourced from locally generated Basic auth.

manifest.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
"*://*.mouser.com/*",
4646
"*://*.mouser.co.uk/*",
4747
"*://uk.farnell.com/*",
48-
"*://*.farnell.com/*"
48+
"*://*.farnell.com/*",
49+
"*://*.element14.com/*",
50+
"*://*.newark.com/*"
4951
],
5052
"js": ["src/content_script.js"]
5153
}

src/content_script.js

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ const DISTRIBUTORS = {
1313
mouser: {
1414
provider: MOUSER_PROVIDER,
1515
sourcePartLabel: "Mouser part",
16+
partnerName: "mouser",
1617
baseUrl: "https://ms.componentsearchengine.com"
1718
},
1819
farnell: {
1920
provider: FARNELL_PROVIDER,
2021
sourcePartLabel: "Farnell part",
22+
partnerName: "farnell",
2123
baseUrl: "https://farnell.componentsearchengine.com"
2224
}
2325
};
@@ -33,6 +35,14 @@ function isEasyedaHost() {
3335
return /(^|\.)((lcsc|jlcpcb)\.com)$/i.test(window.location.hostname);
3436
}
3537

38+
function isElement14Host() {
39+
return /(^|\.)element14\.com$/i.test(window.location.hostname);
40+
}
41+
42+
function isNewarkHost() {
43+
return /(^|\.)newark\.com$/i.test(window.location.hostname);
44+
}
45+
3646
// Normalize a label so we can compare it reliably.
3747
function normalizeLabel(text) {
3848
return text.replace(/\s+/g, " ").trim().toLowerCase();
@@ -223,6 +233,7 @@ function findFarnellProductData() {
223233
const descriptionData = parseFarnellDescriptionProductData();
224234
const imageAltData = parseFarnellImageAltProductData();
225235
const pathData = parseFarnellPathProductData();
236+
const newarkHost = isNewarkHost();
226237

227238
return {
228239
manufacturerName:
@@ -238,7 +249,12 @@ function findFarnellProductData() {
238249
pathData?.manufacturerPartNumber ||
239250
null,
240251
sourcePartNumber:
241-
findLabeledText(["Order Code", "Farnell Part No", "Farnell No"], true) ||
252+
findLabeledText(
253+
newarkHost
254+
? ["Newark Part No", "Newark No", "Order Code"]
255+
: ["Order Code", "Farnell Part No", "Farnell No"],
256+
true
257+
) ||
242258
pathData?.sourcePartNumber ||
243259
getQueryParamValue("partNumber", "productId")
244260
};
@@ -297,17 +313,20 @@ function buildSamacsysPartContext({
297313
sourcePartNumber,
298314
manufacturerPartNumber,
299315
manufacturerName,
316+
sourcePartLabel,
317+
partnerName,
300318
baseUrl,
301319
authRefreshUrl,
302320
logo,
303321
lang
304322
}) {
305323
const config = DISTRIBUTORS[distributor];
324+
const resolvedPartnerName = partnerName || config.partnerName || distributor;
306325
const entryUrl = buildSamacsysEntryUrl({
307326
baseUrl: baseUrl || config.baseUrl,
308327
manufacturerName,
309328
manufacturerPartNumber,
310-
partnerName: distributor,
329+
partnerName: resolvedPartnerName,
311330
logo,
312331
lang
313332
});
@@ -317,14 +336,14 @@ function buildSamacsysPartContext({
317336

318337
return {
319338
provider: config.provider,
320-
sourcePartLabel: config.sourcePartLabel,
339+
sourcePartLabel: sourcePartLabel || config.sourcePartLabel,
321340
sourcePartNumber,
322341
manufacturerPartNumber,
323342
lookup: {
324343
manufacturerName,
325344
entryUrl,
326345
...(authRefreshUrl ? { authRefreshUrl } : {}),
327-
partnerName: distributor,
346+
partnerName: resolvedPartnerName,
328347
samacsysBaseUrl: baseUrl || config.baseUrl
329348
}
330349
};
@@ -419,18 +438,37 @@ function findMouserPartContext() {
419438
}
420439

421440
function findFarnellPartContext() {
441+
const element14Host = isElement14Host();
442+
const newarkHost = isNewarkHost();
443+
const brandPartnerName = newarkHost
444+
? "newark"
445+
: element14Host
446+
? "element14"
447+
: "farnell";
448+
const brandSourcePartLabel = newarkHost
449+
? "Newark part"
450+
: element14Host
451+
? "element14 part"
452+
: "Farnell part";
453+
const brandBaseUrl = newarkHost
454+
? "https://newark.componentsearchengine.com"
455+
: element14Host
456+
? "https://element14.componentsearchengine.com"
457+
: DISTRIBUTORS.farnell.baseUrl;
422458
const samacsysLink = findSamacsysLinkElement();
423-
const linkMetadata = parseSamacsysLinkUrl(samacsysLink?.href, "farnell");
459+
const linkMetadata = parseSamacsysLinkUrl(samacsysLink?.href, brandPartnerName);
424460
const farnellProductData = findFarnellProductData();
425461
const manufacturerName = linkMetadata?.manufacturerName || farnellProductData.manufacturerName;
426462
const manufacturerPartNumber =
427463
linkMetadata?.manufacturerPartNumber || farnellProductData.manufacturerPartNumber;
428464
return buildSamacsysPartContext({
429465
distributor: "farnell",
466+
sourcePartLabel: brandSourcePartLabel,
430467
sourcePartNumber: farnellProductData.sourcePartNumber,
431468
manufacturerPartNumber,
432469
manufacturerName,
433-
baseUrl: linkMetadata?.baseUrl || DISTRIBUTORS.farnell.baseUrl,
470+
partnerName: linkMetadata?.partnerName || brandPartnerName,
471+
baseUrl: linkMetadata?.baseUrl || brandBaseUrl,
434472
authRefreshUrl: linkMetadata ? samacsysLink.href : null,
435473
logo: linkMetadata?.logo,
436474
lang: linkMetadata?.lang

src/settings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ <h2 id="downloadSettingsTitle">Downloads</h2>
4848
<section class="settings-section" aria-labelledby="authSettingsTitle">
4949
<h2 id="authSettingsTitle">SamacSys sign-in</h2>
5050
<p class="settings-hint">
51-
Leave blank unless Mouser or Farnell asks you to sign in before
51+
Leave blank unless Mouser, Farnell, element14, or Newark asks you to sign in before
5252
downloading CAD files.
5353
</p>
5454
<label class="settings-field" for="samacsysFirefoxUsername">

0 commit comments

Comments
 (0)