返回资讯中心
外部精选
软件工程
#开发者实时流

RicKaptcha 在 Show HN 发布

来源标题:Show HN: RicKaptcha

开发者向 Hacker News 的 Show HN 板块提交了名为 RicKaptcha 的项目。该帖标题仅为“Show HN: RicKaptcha”,正文和摘要内容实为前端打包代码片段,未提供产品说明。

Hacker News 最新gudzpoz2026/11/9 · 8 天前9 分钟阅读

以下正文由 AI 翻译自 Hacker News 最新(原文版权归原站所有),可能存在偏差,重要内容请以原文为准。

+a:``,g=i+``+a,_=``,v=``,y=0;y+a:+=i++a}d&&(_=i+);var E=;switch(e.container){case`svg`:p&&(E+=+a),E+=+a,E+=h+g+_,E+=;break;casesvg-viewbox:p&&(E+=+a),E+=+a,E+=h+g+,E+=;break;case`g`:E+=+a,E+=h+g+,E+=;break;default:E+=(h+g+_).replace(/^\s+/,);break}return E},h.prototype.save=function(e,t){var n=this.svg();typeof t!=function&&(t=function(e,t){});try{l().writeFile(e,n,t)}catch(e){t(e)}},t!==void 0&&(t.exports=h)})),d=o(((e,t)=>{t.exports=a,t.exports.isMobile=a,t.exports.default=a;var n=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,i=/android|ipad|playbook|silk/i;function a(e){e||={};let t=e.ua;if(!t&&typeof navigator1&&t.indexOf(Macintosh)!==-1&&t.indexOf(Safari)!==-1&&(a=!0),a}})),f=c(u(),1),p=c(d(),1),m= ,h=!1,g=new Promise(e=>{document.addEventListener(visibilitychange,()=>{document.visibilityState===visible&&e()}),document.visibilityState===visible&&e()}),=class extends HTMLElement{};function v(e,t){t=t? ${t}:;let n=`center / contain no-repeat url('data:image/svg+xml;utf8,${encodeURIComponent(e)}')`;return}var y={header:扫描以验证您是人类,hint:使用您手机的相机应用扫描此二维码。这将安全地关联您的设备。,hintIcon:,generate(e){let t=new f.default(e);return t.options.padding=0,v(t.svg(),`id="rcha-qr"`)}},b={header:`移动端验证`,hint:`验证将在您的设备上初始化 reCAPTCHA 应用。`,hintIcon:,generate(e){return 点击验证 }},x=,S=,C=,w=,T=;async function E(e,t,n){h||=(window.customElements.define(`r-cha`,_),!0);let r=n?.mobile??(0,p.default)()?b:y,i=typeof e==`string`?document.querySelector(e):e;return i.innerHTML=` ${r.header} ${v(r.hintIcon,`id="rcha-hint-icon"`)} ${r.hint} ${r.generate(t)} 刷新表单五次即可通过此恶作剧。 ${v(x,`style="opacity: 1; cursor: pointer;" id="rcha-bar-refresh" class="rcha-bar-item" role="button" title="刷新表单"`)} ${[S,C].map(e=>v(e,`style="cursor: not-allowed;" class="rcha-bar-item" aria-hidden="true"`)).join()} ${v(w,style="opacity: 1; cursor: pointer;" id="rcha-bar-info" class="rcha-bar-item" role="button" title="说明")} ,i.querySelector(#rcha-bar-info).addEventListener(click,()=>{window.open(https://github.com/gudzpoz/rickaptcha`,`_blank`)}),g.then(()=>{setTimeout(()=>{i.querySelector(`#rcha-hint-hint`).style.opacity=1},5e3)}),new Promise(e=>{let n=0;i.querySelector(#rcha-bar-refresh).addEventListener(click,()=>{n+=1,setTimeout(()=>{i.querySelector(#rcha-content).innerHTML=r.generate(t.includes(#)?t:${t}#${n})},500),n===5&&(e(!0),i.querySelector(#rcha-status).innerHTML=v(T,style="cursor: pointer;" id="rcha-check" class="rcha-bar-item" title="已验证"),setTimeout(()=>{i.querySelector(#rcha-check).style.opacity=1},1))})})}var D=document.querySelector(main);D.style.display=none,E(#left,https://youtu.be/dQw4w9WgXcQ,{mobile:!1}).then(()=>{D.style.display=block}),E(#right,https://youtu.be/dQw4w9WgXcQ,{mobile:!0}).then(()=>{D.style.display=block}); ricKAPTCHA 一个类似 reCAPTCHA 的界面,用于 Rickroll(瑞克摇恶作剧)。 如果你不了解 reCAPTCHA, 它是 Google 提供的一项服务,主要用于验证用户不是机器人。 如果你不了解 reCAPTCHA 近期的变化,请参阅新闻报道和各类讨论:

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →