{"id":23179685,"url":"https://github.com/jesterjunk/lucy","last_synced_at":"2026-01-27T02:34:50.315Z","repository":{"id":234869960,"uuid":"789659606","full_name":"jesterjunk/lucy","owner":"jesterjunk","description":"copy reddit image post urls to clipboard","archived":false,"fork":false,"pushed_at":"2024-04-21T08:07:58.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-05T08:11:57.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jesterjunk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-21T07:27:31.000Z","updated_at":"2024-04-21T08:08:01.000Z","dependencies_parsed_at":"2024-04-21T08:49:42.518Z","dependency_job_id":"41ead8ed-fe52-40d7-a0ea-f51b2c8b423b","html_url":"https://github.com/jesterjunk/lucy","commit_stats":null,"previous_names":["jesterjunk/lucy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jesterjunk/lucy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesterjunk%2Flucy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesterjunk%2Flucy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesterjunk%2Flucy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesterjunk%2Flucy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jesterjunk","download_url":"https://codeload.github.com/jesterjunk/lucy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesterjunk%2Flucy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28796977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"online","status_checked_at":"2026-01-27T02:00:07.755Z","response_time":168,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-18T07:16:51.411Z","updated_at":"2026-01-27T02:34:50.302Z","avatar_url":"https://github.com/jesterjunk.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# lucy\n```\ncopy Reddit image post urls to clipboard\n\nc  y                   u l\n\n  \\  \\              /  /\n\n          l u c y\n```\n\n\u003cbr\u003e\n\nThis bookmarklet is written for **Reddit**, to capture and reformat urls from image posts, these reformatted urls are then copied to the clipboard and a 1 second overlay appears to confirm that the bookmarklet executed.\n\nAfter running the bookmarklet, use CTRL + V to paste the urls either in a comment, or anywhere else that you want.\n\nSingle image posts are just the reformatted url.\n\nGallery image posts will be formatted as a numbered list, with a number preceeding each url in the order that they appeared as images in the gallery.\n\n\u003chr\u003e\n\nThis is the current working bookmarklet:\n```\njavascript:\"use strict\";void function(){javascript:(function(){function a(a){var b=a.match(c);return b%3F\"https://i.redd.it/\"+b[1]:null}function b(a){var b=document.createElement(\"div\");b.style.cssText=\"\\nposition: fixed;\\ntop: 0;\\nleft: 0;\\nwidth: 100%25;\\nheight: 100%25;\\nbackground-color: rgba(0,0,0,0.5);\\ncolor: white;\\ndisplay: flex;\\njustify-content: center;\\nalign-items: center;\\nz-index: 9999;\\n\",b.textContent=a,document.body.appendChild(b),setTimeout(function(){return document.body.removeChild(b)},1e3)}var c=/-(\\w+\\.[^%3F]*)/,d=[],e=document.querySelector(\"[id=\\\"post-image\\\"]\");if(e)d.push(a(e.src));else{var f=document.querySelectorAll(\"gallery-carousel ul li \u003e img\");f.forEach(function(b,c){var e=b.src||b.getAttribute(\"data-lazy-src\");e%26%26d.push(c+1+\". \"+a(e))})}var g=d.join(\"\\n\");if(navigator.clipboard%26%26window.isSecureContext)navigator.clipboard.writeText(g).then(function(){b(\"%23 image url/s copied to clipboard\")});else{var h=document.createElement(\"textarea\");h.value=g,document.body.appendChild(h),h.select(),document.execCommand(\"copy\"),document.body.removeChild(h),b(\"%23 image url/s copied to clipboard\")}})()}();\n```\n\n\u003chr\u003e\n\nThis is the source code that it was created from:\n```javascript\njavascript:(function() {\n\n    const regex = /-(\\w+\\.[^?]*)/;\n\n    function transform_url(input_url) {\n\n        const match = input_url.match(regex);\n\n        if (match) {\n\n            return `https://i.redd.it/${match[1]}`;\n        }\n\n        return null;\n    }\n\n    var urls = [];\n\n    var post_image = document.querySelector(`[id=\"post-image\"]`);\n\n    if (post_image) {\n\n        urls.push(transform_url(post_image.src));\n    }\n    else {\n\n        var gallery_carousel = document.querySelectorAll(`gallery-carousel ul li \u003e img`);\n\n        gallery_carousel.forEach((img, index) =\u003e {\n            var src = img.src || img.getAttribute(`data-lazy-src`);\n            if (src) {\n                urls.push(`${index + 1}. ${transform_url(src)}`);\n            }\n        });\n    }\n\n    var copiedText = urls.join('\\n');\n\n    if (navigator.clipboard \u0026\u0026 window.isSecureContext) {\n\n        navigator.clipboard.writeText(copiedText).then(() =\u003e {\n\n            showOverlay(\"# image url/s copied to clipboard\");\n        });\n    }\n    else {\n\n        var textarea = document.createElement(\"textarea\");\n\n        textarea.value = copiedText;\n\n        document.body.appendChild(textarea);\n\n        textarea.select();\n\n        document.execCommand(\"copy\");\n\n        document.body.removeChild(textarea);\n\n        showOverlay(\"# image url/s copied to clipboard\");\n    }\n\n    function showOverlay(message) {\n\n        var overlay = document.createElement(\"div\");\n        overlay.style.cssText = `\nposition: fixed;\ntop: 0;\nleft: 0;\nwidth: 100%;\nheight: 100%;\nbackground-color: rgba(0,0,0,0.5);\ncolor: white;\ndisplay: flex;\njustify-content: center;\nalign-items: center;\nz-index: 9999;\n`;\n        overlay.textContent = message;\n\n        document.body.appendChild(overlay);\n\n        setTimeout(() =\u003e document.body.removeChild(overlay), 1e3);\n    }\n})();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesterjunk%2Flucy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjesterjunk%2Flucy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesterjunk%2Flucy/lists"}