YouTube Network Speed: Show MB/s with Tampermonkey

Preface Saw a group friend's YouTube video info page where network speed is converted to MB/s My hands are itching, I also want to make one myself. Analysis Open F12 developer tools, select the HTML element of the network speed on the video info panel. Right-click menu, Copy JS path The HTML element path of the text displaying network speed is document.querySelector("#movie_player > div.html5-video-info-panel.ytp-sfn > div > div:nth-child(9) > span > span:nth-child(2)") Developing with GPT I have an HTML page, in which an element at this position 1) document.querySelector("#movie_player > div.html5-video-info-panel.ytp-sfn > div > div:nth-child(9) > span > span:nth-child(2)") has content in the format 17085 Kbps, I need to add an element 2) after this element 1), with content showing the value from element 1) converted to the unit MB/s. The number in element 2) should refresh every 10 seconds The result developed by GPT, first teste...

YouTube 视频信息页面 网速换算为 MB/s 油猴篡改猴tampermonkey脚本

前言 看到一个群友的YouTube 视频信息页面 网速换算为 MB/s 手痒, 也想自己整一个. 分析 F12开发者工具, 选择视频信息面板上的网速 HTML元素. 右键菜单 Copy JS path 得到 显示网速的文字 HTML 元素path为 document.querySelector("#movie_player > div.html5-video-info-panel.ytp-sfn > div > div:nth-child(9) > span > span:nth-child(2)") 面向GPT开发 我有一个html页面, 其中这个位置的元素 1) document.querySelector("#movie_player > div.html5-video-info-panel.ytp-sfn > div > div:nth-child(9) > span > span:nth-child(2)") 内容是  17085 Kbps 这样的格式, 我需要在这个元素 1) 的后面, 增加一个元素 2) , 内容为 元素 1) 的内容换算为 MB/s 的单位. 元素 2) 的数字 应该每10秒刷新 GPT开发的结果, 先在 F12 工具的 console 里面测试效果. 效果正常. 用油猴插件固定此脚本的效果 具体细节步骤略. 油猴插件 https://chromewebstore.google.com/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo 脚本文件名应该为 xxx.user.js @match 中为 https://www.youtube.com/watch* 效果为匹配所有YouTube播放页面url GPT开发的代码填写到 // You code here ... 下面 上传GitHub https://github.com/crazypeace/youtube-MB-per-s ======== 后记 本次使用GPT的过程中, 用到的GPT是 Gemini ======== 相关推荐 《油猴篡改猴tampermonkey 5.4 坏了 扩展程序管理页面 更新 脚本被清空了》

Cloudflare Snippet Reverse Proxy for Blogspot

Preface Recently I saw someone using cloudflare's snippet to implement node functionality similar to worker. Idea It seems, On one hand, free users now have the opportunity to use snippets. On the other hand, the functionality of snippets has been enhanced, making the difference with worker even smaller. So I want to use snippet to implement the reverse proxy for blogspot that I previously did with worker. Practice The syntax in uniproxy is relatively old, it's like this addEventListener('fetch', event => {     event.respondWith(handleRequest(event.request)) }) When used in snippet, it should be changed to this export default {   async fetch(request, env, ctx) {     try {       return await handleRequest(request, env, ctx);     } catch (e) {       return new Response(e.message || "Internal Error", { status: 500 });     }   }, }; I let GPT do the conversion. From the result, apart from this one change, all other code remains exactly the same. Uploaded to Git...

用Cloudflare Snippet实现反代Blogger/blogspot

前言 最近看到有人应用 cloudflare 的 snippet 实现 像 worker 一样的节点功能. 思路 看来,  一方面, 免费用户也有机会使用 snippet 了. 另一方面, snippet 的功能也增强了, 和worker 的区别更小了. 那么我就想用snippet实现之前用worker实现的反代blogspot的效果. 实践 uniproxy里面的语法比较老, 是这样的 addEventListener('fetch', event => {     event.respondWith(handleRequest(event.request)) }) 用在snippet的话, 要改成这样的 export default {   async fetch(request, env, ctx) {     try {       return await handleRequest(request, env, ctx);     } catch (e) {       return new Response(e.message || "Internal Error", { status: 500 });     }   }, }; 我让GPT做了转换.  从结果来看, 就除了这一点变化, 其它代码全部保持原样. 已上传Github https://github.com/crazypeace/cloudflare-workers-uniproxy/blob/master/snippet.js 反代blogspot的worker代码 把需求发给GPT 当我把同样一份代码用于 worker 和  snippet  有没有办法识别当前环境是 worker 还是 snippet, 从而 打开 或关闭 KV相关的代码逻辑? 结果是判断是否存在绑定KV的环境变量. 这个逻辑本身也挺好的, 即使是用于worker, 也可以避免在worker的环境下, 用户没有绑定KV而产生异常. 已上传Github https://github.com/crazypeace/cf-wo...

Show Labels on Blogger Homepage with Simple Fix

Preface I want to encourage visitors to jump to more blog posts. On the single post page, I placed the labels below the article title. I want to achieve a similar effect on the homepage as well. Analysis Open Blogger backend - Theme - Edit HTML Jump to the Blog1 section. Reading the HTML, I found that this is where the labels are displayed and there is logic to determine whether it's a post page. We modified it to   You can notice that  data:view.isSingleItem and   was removed. Result It worked. ======== Recommended Posts 《Using Markdown in Blogger Posts》 《Using the Stylebot Extension to Adjust Blogger Editor Width and Hide the Right Sidebar》 《Using Cloudflare Snippet to Reverse Proxy blogspot》

Blogger/blogspot首页显示博文的标签

前言 我想促进访问者跳转到更多的博文. 在单篇博文的页面, 我把 标签放在了文章的标题下面. 我想在首页也实现类似的效果. 分析 打开 blogger 后台 - 主题背景 - 修改HTML 跳转到 Blog1 段. 阅读HTML, 发现是这里显示标签 并且有逻辑判断是否为博文页面. 我们修改为 <b:includable id='postLabels'> <b:if cond='data:widget.type == &quot;Blog&quot;'>   <b:include name='super.postLabels'/> </b:if> </b:includable> 可以注意到  data:view.isSingleItem and   被删除了. 效果 成功了. ======== 精彩推荐 《在 Blogger 的内容中使用 markdown》 《用Stylebot插件 修改blogger编辑器宽度 隐藏右栏》 《用Cloudflare Snippet实现反代blogspot》

Build a Podcast Episode Image Extractor with GPT

1. Get the podcast's RSS Thanks to https://medium.com/彼得潘的試煉-勇者的-100-道-swift-ios-app-謎題/236-利用-apple-podcasts-網站開發有趣的-podcast-app-99b057270be1 First, find the podcast's Apple Podcast URL https://podcasts.apple.com/cn/podcast/独树不成林/id 1711052890 Pay attention to the id part Then append the id to the end of this link https://itunes.apple.com/lookup?id= Get https://itunes.apple.com/lookup?id= 1711052890 Access it with a browser, and you'll get a JSON-formatted file. Open it with a text tool (you can also use a JSON tool, such as https://www.json.cn/ ) Find feedurl https://feed.xyzfm.space/y9qnpfdrctnx This is the RSS. 2. Find the cover image Open the RSS link with a browser, and find the part that looks like the following—that's the cover image https://image.xyzcdn.net/Fgd_z5yexkQF_GB0LF4Xncqqf8CU.png "/> 3. Develop with GPT Implement an HTML/JS-based tool The page includes the following parts 1) A text box for inputting the podcast's RSS URL 2) A text box that...

下载 独树不成林 播客的全部封面 并做成 电报telegram 贴纸sticker

1. 得到这个播客的RSS 感谢 https://medium.com/彼得潘的試煉-勇者的-100-道-swift-ios-app-謎題/236-利用-apple-podcasts-網站開發有趣的-podcast-app-99b057270be1 我们先找到播客的apple podcast地址 https://podcasts.apple.com/cn/podcast/独树不成林/id 1711052890 注意id的部分 然后把id拼到这个链接的后面 https://itunes.apple.com/lookup?id= 得到 https://itunes.apple.com/lookup?id= 1711052890 用浏览器访问, 得到一个JSON格式的文件. 用文本工具打开(你也可以找JSON工具, 如 https://www.json.cn/ ) 找到 feedurl https://feed.xyzfm.space/y9qnpfdrctnx 这就是RSS了. 2. 找到封面图片 用浏览器打开RSS链接, 找到像下面这样的部分就是封面图片 <itunes:image href=" https://image.xyzcdn.net/Fgd_z5yexkQF_GB0LF4Xncqqf8CU.png "/> 3. 面向GPT开发 实现一个基于HTML JS的工具 页面包含以下几个部分 1) 文本框 可输入podcast的RSS地址 2) 文本框 可从 1) 获取RSS内容, 也可以手工输入RSS内容 3) 文本框 分析 2) 的内容, 列出所有封面图片的地址. 可手工编辑 添加或删除 4) 显示 3) 中的地址对应的图片 举例: https://feed.xyzfm.space/y9qnpfdrctnx 是一个podcast的RSS地址, 会被填写到 1) 1) 可得到RSS数据, xml格式.  会被填写到 2) 2) 中有 <itunes:image href="https://image.xyzcdn.net/Fgd_z5yexkQF_GB0LF4Xncqqf8CU.png"/> 这样的元素, 应该将 https://image.xyzcdn.net/Fgd_z5yexkQF_GB0LF4X...

Telegram Username Squatting: Ensha Group Risks

https://t.me/homelab520 This used to be a group for Ensha (恩山) users, where people discussed NAS, soft routers, and such... Today I happened to take a look, and it turned out like this. I guess it's because for some reason the username was released, and then someone snatched it up. ======== Related Recommendations 《Thoughts on Telegram's Anti-Ad Bots》 《Telegram Users Should Not Use Usernames, Groups Should Not Be Public — To Combat Spam》 《Commercial Telegram Keyword Monitor Bot》

电报 Telegram 用户和群主 要保护好自己的用户名username 不要让别人占了

https://t.me/homelab520 这以前是 恩山用户相关的群, 里面都是讨论 NAS啊, 软路由啊, ... 今天我偶然看一眼, 是这样的了. 我猜是因为某种原因, 用户名username被释放了, 然后就被人占了. ======== 相关推荐 《关于telegram电报防广告机器人想到的》 《电报 Telegram 用户不要使用用户名 群组不要使用公开群 为了对抗广告信息》 《商业化电报关键词提醒机器人 telegram keyword monitor bot》

Telegram Keyword Monitor Bot Experiment & Privacy Tips

Preface Telegram Keyword Monitor Bot Telegram Keyword React Bot Experiment What information can be output in the keyword monitoring channel under different circumstances, which means what information the keyword monitor bot can obtain The monitor bot can obtain  Links to group messages, e.g. https://t.me/testbot/5678 or https://t.me/c/3101361513/1234 The group's username or userid The user's username or userid User has a username, group is a public group #FOUND (https://t.me/tteessttbboottt/487) "✌️" IN test公开群(@tteessttbboottt) FROM 小 白龙(@hakuhakoo) ✌️ User has a username, group is a private group #FOUND (https://t.me/c/3101631513/3) "✌️" IN test私有群(3101631513) FROM 小 白龙(@hakuhakoo) ✌️ User has no username, group is a public group #FOUND (https://t.me/tteessttbboottt/486) "✌️" IN test公开群(@tteessttbboottt) FROM icd yct(7809800531) ✌️ User has no username, group is a private group #FOUND (https://t.me/c/3101631513/2) "✌️" IN test私有群(310163...

电报 Telegram 用户不要使用用户名 群组不要使用公开群 为了对抗广告信息

前言 电报关键字监控机器人 电报关键字反应机器人 实验 在不同情况下, 关键字监控频道中能输出什么信息, 意味着 关键字监控机器人能获得什么信息 监控机器人可以获得  群消息的 链接, 如 https://t.me/testbot/5678 或 https://t.me/c/3101361513/1234 群组的 username 或 userid 用户的 username 或 userid 用户有用户名, 群组是公开群 #FOUND (https://t.me/tteessttbboottt/487) "✌️" IN test公开群(@tteessttbboottt) FROM 小 白龙(@hakuhakoo) ✌️ 用户有用户名, 群组是私有群 #FOUND (https://t.me/c/3101631513/3) "✌️" IN test私有群(3101631513) FROM 小 白龙(@hakuhakoo) ✌️ 用户无用户名, 群组是公开群 #FOUND (https://t.me/tteessttbboottt/486) "✌️" IN test公开群(@tteessttbboottt) FROM icd yct(7809800531) ✌️ 用户无用户名, 群组是私有群 #FOUND (https://t.me/c/3101631513/2) "✌️" IN test私有群(3101631513) FROM icd yct(7809800531) ✌️ 作为一个只关注了监控频道的电报Telegram账户, 能否给关键字用户发私信 用户有用户名, 群组是公开群 OK 用户有用户名, 群组是私有群 OK 用户无用户名, 群组是公开群 OK 用户无用户名, 群组是私有群 NG 总结 所以, 为了对抗广告信息, 用户不要使用用户名, 群组不要使用公开群 作为用户, 如果你不希望自己喜欢的用户名username被别人使用, 你可以创建一个频道, 占用这个用户名. 作为群主, 你可以用你原来想用的群用户名username创建频道, 然后在频道中提示用户使用私有群的加群链接. ======== 相关推荐 《关于telegram电报防广告机器人想到的》 《电报防广告机器人 telegr...

Telegram Keyword Bot: Send Sticker via Direct Message

Preface Already implemented: detect a keyword and send a sticker in the group What about sending a direct message to the user directly? Requirement When the keyword  naive  is detected, send the sticker via direct message Technical Foundation Telegram keyword monitor bot GPT-Oriented Development 基于以上代码, 增强开发以下功能 当监控频道中出现"naive "时, 向用户私信发送贴纸. 贴纸为 https://t.me/addstickers/fuckgfwnewbie 的第2个贴纸 注意到监控频道的通知信息是有格式的. #FOUND (https://t.me/c/1958152252/300436) "自建" IN Joey Huang Blog(1958152252) FROM jacky jay(5979280761) 自建的节点怎么不能访问X和chatgpt啊 #FOUND (https://t.me/LoonCommunity/161393) "大佬" IN Loon Community(@LoonCommunity) FROM Yang Bo(@Zen_Neng_Bu_Bian_Tai) 大佬们,loon怎么在不开梯子的情况下去除广告啊? 通信信息的第1行格式为 #FOUND (源信息) "匹配关键字" IN xxx (群username或userid) FROM yyy (用户username或userid) Upload to Github https://github.com/crazypeace/tg-keyword-react-bot Demo Video Deployment See the project Readme ======== Postscript This time (2025-11-09) for GPT-oriented development, th...

当检测到关键字时 私信发送对应的贴纸 tg-keyword-react-bot

前言 已经实现了 检测到关键字 在群里发送贴纸 如果直接给用户发送私信呢? 需求 当检测到关键字  naive  时 私信发送贴纸 技术基础 电报 telegram 关键字监控机器人 面向GPT开发 基于以上代码, 增强开发以下功能 当监控频道中出现"naive "时, 向用户私信发送贴纸. 贴纸为 https://t.me/addstickers/fuckgfwnewbie 的第2个贴纸 注意到监控频道的通知信息是有格式的. #FOUND (https://t.me/c/1958152252/300436) "自建" IN Joey Huang Blog(1958152252) FROM jacky jay(5979280761) 自建的节点怎么不能访问X和chatgpt啊 #FOUND (https://t.me/LoonCommunity/161393) "大佬" IN Loon Community(@LoonCommunity) FROM Yang Bo(@Zen_Neng_Bu_Bian_Tai) 大佬们,loon怎么在不开梯子的情况下去除广告啊? 通信信息的第1行格式为 #FOUND (源信息) "匹配关键字" IN xxx (群username或userid) FROM yyy (用户username或userid) 上传Github https://github.com/crazypeace/tg-keyword-react-bot 演示视频 部署 见项目Readme ======== 后记 本次 (2025-11-09) 面向GPT开发, 用到的GPT是 Claude GPT生成的程序有BUG, 获取消息的纯文本 message_text = event.message.message 正确的做法是提取消息的 markdown 文本 from telethon.extensions import markdown message_text = markdown.unparse(event.message.message, event.message.entities) ======== 相关推荐 《当检测到关键字 三色图 时 发送贴纸 tg-keyword-react-...

Show Hidden Buttons in Blogger Editor Toolbar

Preface Continuing from the previous article, we have already hidden the right sidebar of the Blogger editor But when there is enough space, the toolbar still produces a collapsed split bar. This article aims to solve this problem. Analysis Using the F12 developer tools, analyze the HTML content of the toolbar It is found that within this toolbar, some buttons are hidden. That is, they exist in the HTML content, but are not displayed on the page. Developing with GPT Because of the text input word limit of GPT, we need to save the HTML content of the toolbar as a file and then upload it to GPT. HTML Environment I have a toolbar. The HTML content is in the file The toolbar contains some buttons Some buttons are displayed, some are hidden Now I need to set all buttons under the toolbar to be displayed Require to use CSS for setting page elements Buttons may be dynamic, so do not specify the button's class; instead, analyze based on the HTML hierarchy between the button and the toolbar...