eBay: open the full photo in a new tab
Adds a link below the main item photo that opens the full-resolution image in a new tab.
Code to copy
// Add an "Open full photo" link under the main item image
function addPhotoLink() {
if (document.getElementById('jz-eby-photo-link')) { return; }
const img = document.querySelector('.ux-image-carousel img, .ux-image-magnify__container img');
if (!img || !img.src) { return; }
const a = document.createElement('a');
a.id = 'jz-eby-photo-link';
a.textContent = 'Open full photo';
a.href = img.src.replace(/s-l\d+/, 's-l1600');
a.target = '_blank';
a.rel = 'noopener';
a.style.cssText = 'display:inline-block;margin:8px 0;font-weight:700;color:#2b3a8c';
(img.closest('.ux-image-carousel') || img.parentElement).appendChild(a);
}
addPhotoLink();
const obs = new MutationObserver(addPhotoLink);
obs.observe(document.documentElement, { childList: true, subtree: true });
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.