How to Build a One-Time QR Code with URL Redirect

Requirement https://t.me/blacktechsharing/183161 Approach A QR code is essentially a string of characters embedded in an image. This string can be a URL. Since the QR code image has already been sent to others, and you can't go to their computer or phone to delete the image, how is a "one-time QR code" implemented? If the QR code image stays the same, then the URL A corresponding to the QR code stays the same. When you visit URL A, you're accessing a server. This server can make everyone who visits URL A redirect to a new URL B. We define URL B as the URL that actually carries the real meaning. We let the server allow only the first visitor to URL A to be redirected to URL B; subsequent visits to URL A will have the redirection disabled. This is how a "one-time QR code" is implemented.

白嫖worker 自建短链服务 Url-Shorten-Worker 支持阅后即焚snapchat mode 配合二维码生成工具 制作一次性二维码

需求 https://t.me/blacktechsharing/183161 思路 二维码实际上就是以一种图片的方式写的一串字符. 这串字符可以是一个网址. 既然这个二维码图片已经发给别人了, 你不可以跑到别人的电脑或者手机里面去删掉图片, 那么"一次性二维码"是怎么实现的呢? 二维码图片不变, 那么二维码对应的网址A不变. 你访问网址A就是访问一个服务器. 这个服务器可以让来访问网址A的人都跳转到一个新的网址B. 我们定义网址B才是真正有实际意义的网址. 让服务器只允许第一次访问网址A的人跳转到网址B, 以后再来访问网址A, 跳转都失效. 这样就实现了 "一次性二维码".

URL Shortener on Cloudflare Workers with Visit Count

Thanks to https://github.com/EasyChris/Url-Shorten-Worker for implementing the basic counting functionality. Building on this, I further optimized the operation page so that you can read the visit count directly on the operation page, without needing to check the visit count in the KV backend. Demo

白嫖worker 自建短链服务 Url-Shorten-Worker 支持访问计数 visit count 支持查询短链 API接口增删查齐全 可以作为独立短链API服务

感谢 https://github.com/EasyChris/Url-Shorten-Worker 实现基本的计数功能. 我在此基础上, 继续优化了操作页面, 可以在操作页面读出访问计数, 不需要到KV后台去看访问计数了. 效果

Fix Url-Shorten-Worker API Error: CORS Solution

Question  Wanted to debug Url-Shorten-Worker, saved index.html on local computer, called the server API at https://1way.eu.org/, got an error Access to fetch at 'https://1way.eu.org/bodongshouqulveweifengci' from origin 'null' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.

调试 Url-Shorten-Worker API报错 from origin 'null' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.

问题  想调试 Url-Shorten-Worker, 把 index.html 保存在本地电脑上, 调用服务器https://1way.eu.org/的API, 报错 Access to fetch at 'https://1way.eu.org/bodongshouqulveweifengci' from origin 'null' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.

Widen Blogger Editor with Stylish Chrome Extension

Blogger's system is a little bit "outdated". When editing blog posts, I feel the editor's width is a bit too narrow, especially on larger monitors, it doesn't make full use of the screen. You can open the developer tools, find this page element, and increase the width attribute. However, this modification will revert as soon as the page is refreshed. To make this change automatic every time you open the editor page, you can use an extension.

用Stylish插件修改Blogger/blogspot编辑器宽度

blogger的系统有一点点 "过时". 在编辑博文的时候, 我觉得编辑器的宽度有点太窄, 特别是在比较大的显示器上, 显得没有充分利用. 可以打开开发者工具, 找到这个页面元素, 把width属性改大一点. 但是这样修改的结果, 只要刷新页面就复原了. 为了能每次打开这个编辑器页面都可以自动修改. 可以使用插件实现.

Handling Abnormal Blog Traffic with Zero Effort

In October last year and the past two days, my blog has experienced abnormal traffic. The benefit of not using my own domain and server to set up a blog is that no matter how this traffic runs, it's a trivial matter for a big company (Google). For me, it requires zero effort to think about.

不用自己的域名和服务器搭博客的好处就是不怕异常流量

去年10月和最近两天,我的博客都有异常的流量访问。 不用自己的域名和服务器搭博客的好处是,随便这些流量怎么跑,对大公司(Google)来说,都是小意思。对我自己来说,属于完全不用花精力去思考。

How to Add GA4 Tracking Code to Blogger

Get your GA4 code Log in to https://analytics.google.com/ , click "All website data" Select GA4 You will see the code you need to add: G-XXXXXXXXXX Configure Blogger Result

Blogger 切换到 Google Analytics (分析) 4

得到你的 GA4 代码 登录 https://analytics.google.com/ ,点击 "全部网站数据" 选择 GA4 看到你需要添加的代码 G-XXXXXXXXXX 设置Blogger 效果