第029期 - 山衔落日染层林
这是这个月下班的时候,大概 18:22
拍到的夕阳与山林相依的画面,感觉很好看然后就有了这期的封面!
>> 🐈大橘的工具集
Accio:AI 电商采购
一个用人工智能帮助电商卖家采购的网站。它能让找供应商变得简单又快,像个聪明的采购助手。用户可以用它搜供应商、查报价、验证想法,省时间又省钱。不管是新手还是老手,都能轻松用它把采购做得更好
Copy any UI:UI克隆神器 一键复刻网页代码+自动部署
一款前沿的UI复制工具,旨在帮助开发者以像素级精度复刻任何用户界面。通过提供网页URL、截图或设计文件(如Figma),该工具能够自动生成对应的前端代码,确保复制出的界面在视觉效果上与原始设计高度一致。它不仅适用于快速复制网站UI,还能输出结构化代码,极大提升开发效率。目前,这类工具在开发者社区中引起关注,因其简单易用和高效的复制能力而备受好评。
inkdown:Markdown所见即所得编辑器
一个所见即所得(WYSIWYG)的 Markdown 编辑器,旨在提升 Markdown 的阅读和编辑体验,并使得将 Markdown 文件转换成在线文档的过程变得简单快捷
BiliMusic:哔哩哔哩音乐客户端
一个优雅的第三方哔哩哔哩音乐播放器,让你以更好的方式聆听 B 站收藏的音乐
文捕:平台文章下载器
一款在线博客内容解析下载工具,它支持多个平台和多种格式,旨在尽量保留文章的原始排版。该工具的核心优势在于其广泛的平台兼容性和多样的文件导出格式,包括HTML、PDF、Markdown和MHTML
支持平台:微信公众号、CSDN、博客园、简书、思否、阮一峰的网络日志和腾讯云开发者社区等
SaveGame.Pro:游戏下载平台
Nickvision Parabolic:yt-dlp 可视化前端
一个基于 yt-dlp 的前端应用,允许用户下载网页视频和音频。它支持多种格式的视频下载,并且可以同时进行多个下载任务。此外,它还支持下载元数据和视频字幕
Windows Cleaner:Windows 清理工具
一个开源工具,旨在解决 Windows 系统中 C 盘空间不足的问题,并提升系统性能。该工具支持 Windows 10 和 Windows 11 操作系统,提供了图形用户界面(GUI)以方便用户操作
Transok:局域网文件共享
一个高效的局域网文件共享工具。它不占用额外的存储空间,并且对文件传输的数量和大小没有限制。用户在共享文件时还可以设置密码,以防止非法下载
XUGOU:基于CloudFlare搭建的轻量化监控平台
一个基于 CloudFlare 的轻量化系统监控平台,旨在提供系统监控和状态页面功能。该平台的主要目标是实现系统监控、HTTP监控、数据可视化和状态页面展示
Uptime Kuma:轻量化网站状态监控
一个易于使用的自托管监控工具,具有现代的用户界面和丰富的功能。它支持多种监控类型,如HTTP(s)、TCP、Ping等,并提供多种通知服务。该工具支持多语言、多状态页面,并允许用户将状态页面映射到特定域名
DeepPDF:PDF AI翻译
一款能够快速翻译长PDF文件到任何语言的翻译工具,同时保留原始文档的格式和布局。它提供了并排双语对比视图,支持超过100种语言的翻译,并且无需注册即可免费使用。该工具以其高度准确的AI驱动翻译、支持大文件、即时下载翻译后的PDF文件、安全私密的翻译过程等特点,满足学生、专业人士、医疗人员、法律团队和研究人员的需求
drawnix:白板工具
一个开源的白板工具(SaaS),集成了思维导图、流程图和自由画等多种功能。它基于插件机制,支持灵活扩展,并且具备自动保存、编辑特性和无限画布等功能
RSSPod:播客网站
EmojiMyFace:脸部替换emoji
一个使用人工智能技术将用户照片转换成表情符号艺术的在线服务
BilibiliHistoryFetcher:哔哩哔哩历史分析
一个开源工具,旨在帮助哔哩哔哩用户获取、处理、分析和可视化他们的观看历史数据。由于 B 站仅显示最近几个月的观看记录,该项目通过自动化流程解决了历史数据过期的问题,并提供了一系列功能,包括数据存储、分析、可视化、视频下载和自动化任务部署
StreamCap:直播录制
一个基于FFmpeg和StreamGet的多平台直播流录制客户端,覆盖 40+ 国内外主流直播平台,支持批量录制、循环监控、定时监控和自动转码等功能
Excel 摸鱼热榜网站
接入DeepSeek的网站导航
ClawCloud 活动页
n8n:自动化工作流
一个面向技术团队的、结合了代码灵活性和无代码速度的公平代码工作流自动化平台。它提供了400多个集成选项、原生AI功能以及公平代码许可,允许用户在完全控制数据和部署的同时构建强大的自动化工作流
TopHacker News:Hack News 最新帖子中英对照和总结
查看 Ruanyf 的周刊 GitHub 仓库中的 Issues
查词猫
一款集AI智能词典和学术助手于一体的工具,旨在帮助用户更好地理解文本内容和学术资料
MD2Card:Markdown转知识卡片
一个将 Markdown 文档转换成知识卡片的工具,它支持多种风格、自动拆分长文、一键导出图片等功能
聚合搜索
一个一站式的搜索平台,它允许用户在一个地方搜索并获取不同来源的信息。该平台支持分类筛选和个性化标签,以便用户能够更精确地找到所需内容。尽管聚合搜索提供了多种标签和分类,但有时用户可能无法找到匹配的结果,这提示用户尝试更换搜索词或减少筛选条件
如风搜:网盘搜索
vectorCraftr:免费可商业的矢量插图
vectorCraftr 提供完全免费、可商业使用的高质量矢量插图
WXT:浏览器扩展开发框架
下一代的Web扩展框架,以开发者体验为先,通过提供工具简化Web扩展开发流程。它包括压缩和发布工具、顶级的开发模式、有见地的项目结构等。WXT支持快速迭代、开发特性而非构建脚本,并充分利用JS生态系统。此外,WXT还拥有美观的命令行界面(CLI)
Gitingest:通过 git 链接生成摘要
一个将任何 Git 仓库转换为适合大型语言模型(LLMs)的文本摘要的工具。它允许用户通过替换 GitHub URL 中的 "hub" 为 "ingest" 来访问代码库的摘要。该工具提供易于使用的代码上下文、智能格式化输出、文件和目录结构统计、提取大小和令牌计数等特性。Gitingest 提供命令行工具、Python 包和浏览器扩展,支持异步使用,并可通过 Docker 自托管
GitHub Cards:GitHub 个人仓库信息卡片生成
一个由 Corey Chiu 用爱心打造的工具,旨在将用户的 GitHub 贡献以视觉卡片的形式展示出来,增强个人 GitHub 贡献的展示效果
Telegram Files:自托管Telegram文件下载器
一个自托管的 Telegram 文件下载器项目,用于持续、稳定和无人值守的下载。项目使用 Java 和 TypeScript 开发,提供 Docker 部署方案,支持多账户下载、暂停恢复、自动传输等功能
UIF:代理面板
一个具有 代理功能 和 订阅管理 的全平台开源 UI 面板, 可以作为 Clash For Windows、V2rayN、Shadowrocket、X-UI、Openclash、Homeproxy、Passwall 的替代品
帽子云:静态网站部署平台
一款集成化的静态网站部署平台,作为 Github Pages / Cloudflare Pages 的替代方案。它不仅提供更快的访问速度,还支持快速构建、扩展和部署前端服务
Fluent M3U8:m3u8/mpd 下载器
一个基于 PySide6 和 QFluentWidgets 的跨平台 m3u8 下载器,具有多线程下载、任务管理、美观的 GUI 等特点,支持 M3U8 和 MPD 视频下载
XHS-Spider:小红书数据采集工具
一个专为小红书平台设计的数据采集工具,具备批量下载图片、视频资源、去水印等功能
由于该工具受到大量关注并可能对平台服务器造成压力,开发者决定停止维护并清除仓库,避免不必要的麻烦
Sefirah:跨设备剪切板复制
一个旨在提升工作效率的工具,它通过在 Windows PC 和 Android 设备之间实现无缝剪贴板和通知共享,为用户提供了一个替代现有的 Phone Link 和 KDE Connect 的解决方案
全网资源在线搜索:影视资源搜索
freegogpcgames:游戏下载平台
创造者们的宝藏工具箱
Mac Apps聚合搜索和免费下载
电子书搜索
小兔搜搜:一次搜索,全部发现
可以搜索:网盘资源、电子书、软件
OneFlipClock:网页电子时钟
中日文翻译
输入中文,自动翻译为日语并显示假名和罗马音
CodeMerge:合并代码让LLM理解的网站
一个解决开发者将多个代码文件合并后输入给 AI 模型(如 Claude)时遇到的效率问题。该工具通过选择性合并代码文件、过滤无用内容来节省 tokens
开源地址:https://github.com/TownBoats/codeMerge Vercel部署地址:https://code-merge-delta.vercel.app/
哔哩哔哩(bilibili)关注管理器 / 批量取关
快速排序和筛选你的关注列表,一键取关不再关注的UP等
Apache Spark 3.5 Tutorial with Examples:Spark 通过例子进行学习网站
一篇针对初学者的Apache Spark 3.5教程,涵盖了Scala代码示例,介绍了Spark的基础知识、架构、安装过程以及不同模块的使用,还探讨了Spark 3.5支持的Java和Scala版本,并提供了详细的安装指导和运行示例
油猴开发指南:更适合国人体质的油猴教程
一篇关于油猴开发指南的整理和介绍。作者表示,由于个人精力有限,油猴开发指南的更新和重制工作进展缓慢。作者鼓励对油猴感兴趣的人加入贡献,并分享了个人在编写指南过程中的辛苦和收获。指南是开源的,作者没有收益
华为音乐下载工具
一个华为音乐下载工具,提供了多个参数用于控制下载行为。该工具支持单曲、专辑、歌单的下载,并允许用户自定义文件输出路径、下载质量、并发数量等
./hwyy -o ./output -q 3 https://url.cloud.huawei.com/rNNkOMZHB6
LinuxDo VSCode Extension:LinuxDo VSCode 摸鱼插件
一个 VSCode 扩展,用于浏览和参与 LinuxDo 论坛的讨论
Grok-3 Rate Limits 状态栏
油猴脚本
// ==UserScript==
// @name Grok Rate Limit Monitor
// @namespace http://tampermonkey.net/
// @version 0.9
// @description 自动抓取并显示 grok.com 的 rate-limits 请求结果(美化版),支持拖动窗口并定时请求
// @author [email protected] and [email protected]
// @match *://grok.com/*
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==
(function () {
'use strict';
// 调试开关
const DEBUG = true;
function log(...args) {
if (DEBUG) console.log('[Rate Limit Monitor]', ...args);
}
// 默认位置
const defaultTop = 20;
const defaultRight = 20;
// 存储速率限制数据
const rateLimits = {
default: { windowSizeSeconds: '-', remainingQueries: '-', totalQueries: '-' },
reasoning: { windowSizeSeconds: '-', remainingQueries: '-', totalQueries: '-' },
deepsearch: { windowSizeSeconds: '-', remainingQueries: '-', totalQueries: '-' },
};
// 创建美化后的显示窗口
function createDisplay() {
const div = document.createElement('div');
div.id = 'rate-limit-display';
let top = GM_getValue('windowTop', defaultTop);
let right = GM_getValue('windowRight', defaultRight);
div.style.cssText = `
position: fixed;
top: ${top}px;
right: ${right}px;
background: linear-gradient(135deg, #fefefe, #f0f4f8);
border: 1px solid #e0e6ed;
border-radius: 8px;
padding: 12px;
z-index: 10000;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
width: 200px;
transition: all 0.2s ease;
color: #2d3748;
`;
div.innerHTML = `
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; border-bottom: 1px solid #e2e8f0; padding-bottom: 6px;">
<h3 id="rate-limit-header" style="margin: 0; font-size: 14px; font-weight: 600; color: #1a202c; cursor: move;">
Rate Limits
</h3>
<button id="refresh-rate-limits" style="
background: #4299e1;
border: none;
border-radius: 4px;
color: white;
padding: 4px 8px;
font-size: 11px;
cursor: pointer;
transition: background 0.2s;
">刷新</button>
</div>
<div style="margin-bottom: 8px;">
<h4 style="margin: 0 0 4px 0; font-size: 12px; font-weight: 500; color: #4a5568;">Default</h4>
<p style="margin: 2px 0; font-size: 11px; color: #718096;">
Window: <span id="window-size-default" style="color: #2b6cb0; font-weight: 500;">-</span> 秒
</p>
<p style="margin: 2px 0; font-size: 11px; color: #718096;">
Available: <span id="queries-default" style="color: #2f855a; font-weight: 500;">-/-</span>
</p>
</div>
<div style="margin-bottom: 8px;">
<h4 style="margin: 0 0 4px 0; font-size: 12px; font-weight: 500; color: #4a5568;">Reasoning</h4>
<p style="margin: 2px 0; font-size: 11px; color: #718096;">
Window: <span id="window-size-reasoning" style="color: #2b6cb0; font-weight: 500;">-</span> 秒
</p>
<p style="margin: 2px 0; font-size: 11px; color: #718096;">
Available: <span id="queries-reasoning" style="color: #2f855a; font-weight: 500;">-/-</span>
</p>
</div>
<div>
<h4 style="margin: 0 0 4px 0; font-size: 12px; font-weight: 500; color: #4a5568;">Deepsearch</h4>
<p style="margin: 2px 0; font-size: 11px; color: #718096;">
Window: <span id="window-size-deepsearch" style="color: #2b6cb0; font-weight: 500;">-</span> 秒
</p>
<p style="margin: 2px 0; font-size: 11px; color: #718096;">
Available: <span id="queries-deepsearch" style="color: #2f855a; font-weight: 500;">-/-</span>
</p>
</div>
`;
document.body.appendChild(div);
// 添加鼠标悬停效果
div.addEventListener('mouseenter', () => {
div.style.boxShadow = '0 6px 16px rgba(0, 0, 0, 0.15)';
div.style.transform = 'scale(1.02)';
});
div.addEventListener('mouseleave', () => {
div.style.boxShadow = '0 4px 12px rgba(0, 0, 0, 0.1)';
div.style.transform = 'scale(1)';
});
// 添加刷新按钮效果和点击事件
const refreshButton = document.getElementById('refresh-rate-limits');
refreshButton.addEventListener('mouseenter', () => {
refreshButton.style.background = '#3182ce';
});
refreshButton.addEventListener('mouseleave', () => {
refreshButton.style.background = '#4299e1';
});
refreshButton.addEventListener('click', () => {
refreshButton.style.background = '#2c5282';
fetchRateLimits('DEFAULT');
fetchRateLimits('REASONING');
fetchRateLimits('DEEPSEARCH');
setTimeout(() => {
refreshButton.style.background = '#4299e1';
}, 200);
});
// 添加拖动功能
const header = document.getElementById('rate-limit-header');
header.addEventListener('mousedown', startDragging);
}
// 拖动功能
function startDragging(e) {
e.preventDefault();
const div = document.getElementById('rate-limit-display');
const initialMouseX = e.clientX;
const initialMouseY = e.clientY;
const initialTop = parseInt(div.style.top, 10);
const initialRight = parseInt(div.style.right, 10);
function onMouseMove(e) {
const deltaX = e.clientX - initialMouseX;
const deltaY = e.clientY - initialMouseY;
div.style.top = (initialTop + deltaY) + 'px';
div.style.right = (initialRight - deltaX) + 'px';
}
document.addEventListener('mousemove', onMouseMove);
document.addEventListener('mouseup', function onMouseUp() {
document.removeEventListener('mousemove', onMouseMove);
document.removeEventListener('mouseup', onMouseUp);
const newTop = parseInt(div.style.top, 10);
const newRight = parseInt(div.style.right, 10);
GM_setValue('windowTop', newTop);
GM_setValue('windowRight', newRight);
});
}
// 更新显示内容
function updateDisplay() {
document.getElementById('window-size-default').textContent = rateLimits.default.windowSizeSeconds;
document.getElementById('queries-default').textContent = `${rateLimits.default.remainingQueries}/${rateLimits.default.totalQueries}`;
document.getElementById('window-size-reasoning').textContent = rateLimits.reasoning.windowSizeSeconds;
document.getElementById('queries-reasoning').textContent = `${rateLimits.reasoning.remainingQueries}/${rateLimits.reasoning.totalQueries}`;
document.getElementById('window-size-deepsearch').textContent = rateLimits.deepsearch.windowSizeSeconds;
document.getElementById('queries-deepsearch').textContent = `${rateLimits.deepsearch.remainingQueries}/${rateLimits.deepsearch.totalQueries}`;
}
// 发起 rate-limits 请求
function fetchRateLimits(kind) {
log(`Fetching rate limits for ${kind}...`);
fetch('https://grok.com/rest/rate-limits', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
},
body: JSON.stringify({ requestKind: kind, modelName: 'grok-3' }),
})
.then(response => {
log(`Rate limits response status for ${kind}:`, response.status);
return response.json();
})
.then(data => {
const lowerKind = kind.toLowerCase();
log(`Rate limits data for ${kind}:`, data);
rateLimits[lowerKind] = {
windowSizeSeconds: data.windowSizeSeconds ?? '-',
remainingQueries: data.remainingQueries ?? '-',
totalQueries: data.totalQueries ?? '-',
};
log(`Updated Rate Limit for ${lowerKind}:`, rateLimits[lowerKind]);
updateDisplay();
})
.catch(error => {
console.error(`Failed to fetch ${kind} rate-limits:`, error);
log(`Error details for ${kind}:`, error);
});
}
// 定时请求逻辑
let intervalId;
function startPolling() {
const poll = () => {
log('Polling rate limits...');
fetchRateLimits('DEFAULT');
fetchRateLimits('REASONING');
fetchRateLimits('DEEPSEARCH');
};
poll(); // 立即执行一次
intervalId = setInterval(poll, 10 * 60 * 1000); // 每10分钟执行一次
}
function resetPolling() {
log('Resetting polling interval...');
clearInterval(intervalId);
setTimeout(startPolling, 10 * 60 * 1000); // 延迟10分钟后重新开始
}
// 处理 rate-limit 响应的通用函数
async function handleRateLimitResponse(resource, options, response) {
log('Handling potential rate limit response:', { resource, options });
let requestKind = 'default';
try {
const body = typeof options.body === 'string' ? JSON.parse(options.body) :
options.body instanceof Blob ? JSON.parse(await options.body.text()) : null;
log('Parsed request body:', body);
requestKind = body?.requestKind?.toLowerCase() || 'default';
} catch (e) {
log('Failed to parse rate-limit request body:', e);
return;
}
try {
const data = typeof response === 'string' ? JSON.parse(response) : await response.json();
log('Parsed response data:', data);
if (rateLimits.hasOwnProperty(requestKind)) {
rateLimits[requestKind] = {
windowSizeSeconds: data.windowSizeSeconds ?? '-',
remainingQueries: data.remainingQueries ?? '-',
totalQueries: data.totalQueries ?? '-',
};
log(`Updated Rate Limit for ${requestKind}:`, rateLimits[requestKind]);
updateDisplay();
resetPolling();
}
} catch (e) {
log('Failed to parse rate-limit response:', e);
}
}
// 重写 fetch
const originalFetch = window.fetch;
window.fetch = async function (resource, options = {}) {
log('Intercepted fetch request:', { resource, options });
const response = await originalFetch(resource, options);
if (typeof resource === 'string' && resource.includes('/rate-limits')) {
log('Matched rate-limits fetch request');
const clonedResponse = response.clone();
handleRateLimitResponse(resource, options, clonedResponse);
}
return response;
};
// 重写 XMLHttpRequest
const originalOpen = XMLHttpRequest.prototype.open;
const originalSend = XMLHttpRequest.prototype.send;
XMLHttpRequest.prototype.open = function (method, url) {
this._url = url;
this._method = method;
originalOpen.apply(this, arguments);
};
XMLHttpRequest.prototype.send = function (body) {
if (typeof this._url === 'string' && this._url.includes('/rate-limits')) {
log('Intercepted rate-limits XHR request:', { url: this._url, method: this._method, body });
this.addEventListener('load', () => {
handleRateLimitResponse(this._url, { method: this._method, body }, this.responseText);
});
}
originalSend.apply(this, arguments);
};
// 初始化显示窗口并启动定时请求
createDisplay();
startPolling();
// 提示脚本已加载
log('Script loaded with enhanced rate-limit capturing and refresh button.');
})();
claude-3-7-sonnet 新版本(增加拖拽位置记忆)
// ==UserScript==
// @name Rate Limits Monitor
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Monitor conversation limits for default, deepsearch, and reason modes
// @author [email protected] & claude-3-7-sonnet-thinking
// @match https://grok.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Configuration
const UPDATE_INTERVAL = 60000*10; // Update every 10 minutes
const MODES = [
{ name: 'DEFAULT', displayName: 'Default', color: '#4CAF50', valueColor: '#7CFF7C' },
{ name: 'DEEPSEARCH', displayName: 'Deep Search', color: '#2196F3', valueColor: '#7CD5FF' },
{ name: 'REASONING', displayName: 'Reason', color: '#FF9800', valueColor: '#FFC57C' }
];
let timers = {}; // Store timers for each mode
let lastFetchTime = {}; // Track last fetch time for each mode
let windowSizes = {}; // Store window sizes for each mode
// Create monitor UI
function createMonitorUI() {
const monitorDiv = document.createElement('div');
monitorDiv.id = 'limit-monitor';
monitorDiv.style.cssText = `
position: fixed;
bottom: 20px;
right: 20px;
background-color: rgba(28, 30, 33, 0.92);
border-radius: 10px;
padding: 12px;
color: #e0e0e0;
font-family: 'Segoe UI', Arial, sans-serif;
font-size: 14px;
z-index: 10000;
box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
min-width: 220px;
user-select: none;
border: 1px solid rgba(255, 255, 255, 0.1);
`;
// Create title bar with drag handle
const titleBar = document.createElement('div');
titleBar.style.cssText = `
cursor: move;
padding-bottom: 8px;
margin-bottom: 8px;
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
display: flex;
justify-content: space-between;
align-items: center;
`;
titleBar.innerHTML = '<span style="font-weight: bold; font-size: 15px;">Rate Limits Status</span>';
// Add refresh button
const refreshBtn = document.createElement('button');
refreshBtn.textContent = '↻';
refreshBtn.title = "Refresh all limits";
refreshBtn.style.cssText = `
background: rgba(255, 255, 255, 0.1);
border: none;
border-radius: 4px;
color: white;
cursor: pointer;
font-size: 16px;
padding: 2px 8px;
transition: background 0.2s ease;
`;
refreshBtn.onmouseover = () => {
refreshBtn.style.background = 'rgba(255, 255, 255, 0.2)';
};
refreshBtn.onmouseout = () => {
refreshBtn.style.background = 'rgba(255, 255, 255, 0.1)';
};
refreshBtn.onclick = refreshAllLimits;
titleBar.appendChild(refreshBtn);
monitorDiv.appendChild(titleBar);
// Create container for the mode data
const modesContainer = document.createElement('div');
modesContainer.id = 'modes-container';
// Create elements for each mode
MODES.forEach(mode => {
const modeDiv = document.createElement('div');
modeDiv.style.cssText = `
margin-bottom: 8px;
display: flex;
justify-content: space-between;
align-items: center;
`;
const modeLabel = document.createElement('span');
modeLabel.textContent = mode.displayName + ':';
modeLabel.style.cssText = `
font-weight: bold;
color: ${mode.color};
`;
const modeValue = document.createElement('span');
modeValue.id = `${mode.name.toLowerCase()}-limit`;
modeValue.textContent = '?/?';
modeValue.style.cssText = `
font-weight: bold;
color: ${mode.valueColor};
transition: color 0.3s ease;
`;
modeDiv.appendChild(modeLabel);
modeDiv.appendChild(modeValue);
modesContainer.appendChild(modeDiv);
});
monitorDiv.appendChild(modesContainer);
document.body.appendChild(monitorDiv);
// Make the monitor draggable
makeDraggable(monitorDiv, titleBar);
return monitorDiv;
}
// Format seconds to a readable time string
function formatTime(seconds) {
if (seconds < 60) {
return `${seconds}s`;
} else if (seconds < 3600) {
return `${Math.floor(seconds / 60)}m`;
} else {
const hours = Math.floor(seconds / 3600);
const minutes = Math.floor((seconds % 3600) / 60);
return minutes > 0 ? `${hours}h ${minutes}m` : `${hours}h`;
}
}
// Make an element draggable and save position to localStorage
function makeDraggable(element, handle) {
let pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
// Load saved position from localStorage if exists
const savedPosition = JSON.parse(localStorage.getItem('grok-limitMonitorPosition'));
if (savedPosition) {
element.style.top = savedPosition.top;
element.style.left = savedPosition.left;
element.style.right = 'auto';
element.style.bottom = 'auto';
}
handle.onmousedown = dragMouseDown;
function dragMouseDown(e) {
e.preventDefault();
pos3 = e.clientX;
pos4 = e.clientY;
document.onmouseup = closeDragElement;
document.onmousemove = elementDrag;
}
function elementDrag(e) {
e.preventDefault();
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
element.style.top = (element.offsetTop - pos2) + "px";
element.style.left = (element.offsetLeft - pos1) + "px";
element.style.right = 'auto';
element.style.bottom = 'auto';
}
function closeDragElement() {
document.onmouseup = null;
document.onmousemove = null;
// Save new position to localStorage
const position = {
top: element.style.top,
left: element.style.left
};
localStorage.setItem('grok-limitMonitorPosition', JSON.stringify(position));
}
}
// Fetch rate limits for a specific mode
async function fetchRateLimit(mode) {
try {
const response = await fetch('https://grok.com/rest/rate-limits', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
requestKind: mode,
modelName: 'grok-3'
})
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
lastFetchTime[mode] = Date.now();
// Store window size
if (data.windowSizeSeconds) {
windowSizes[mode] = data.windowSizeSeconds;
}
updateLimitDisplay(mode, data);
return data;
} catch (error) {
console.error(`Error fetching rate limits for ${mode}:`, error);
document.getElementById(`${mode.toLowerCase()}-limit`).textContent = 'Error';
}
}
// Update the display for a specific mode
function updateLimitDisplay(mode, data) {
const element = document.getElementById(`${mode.toLowerCase()}-limit`);
if (element && data) {
if (data.waitTimeSeconds !== undefined) {
// 如果存在 waitTimeSeconds,只显示等候时间
element.textContent = formatTime(data.waitTimeSeconds);
} else {
// 否则显示原来的 remaining/total 格式加上时间窗口
const timeWindow = data.windowSizeSeconds ? ` (${formatTime(data.windowSizeSeconds)})` : '';
element.textContent = `${data.remainingQueries}/${data.totalQueries}${timeWindow}`;
}
// Find the corresponding mode configuration
const modeConfig = MODES.find(m => m.name === mode);
// Visual feedback that data was updated
element.style.color = '#4df94d';
setTimeout(() => {
// Return to the mode's value color
if (modeConfig) {
element.style.color = modeConfig.valueColor;
}
}, 500);
}
}
// Refresh all limits
function refreshAllLimits() {
MODES.forEach(mode => {
fetchRateLimit(mode.name);
});
}
// Schedule regular updates
function scheduleUpdates() {
MODES.forEach(mode => {
// Clear any existing timer
if (timers[mode.name]) {
clearInterval(timers[mode.name]);
}
// Set new timer
timers[mode.name] = setInterval(() => {
fetchRateLimit(mode.name);
}, UPDATE_INTERVAL);
});
}
// Intercept fetch to monitor rate-limit requests from the website
function interceptFetch() {
const originalFetch = window.fetch;
window.fetch = async function(input, init) {
const response = await originalFetch(input, init);
// Clone the response to avoid consuming it
const responseClone = response.clone();
try {
// Check if this is a rate-limits request
if (input && input.toString().includes('rate-limits')) {
responseClone.json().then(data => {
// Try to determine which mode this request was for
if (init && init.body) {
try {
const body = JSON.parse(init.body);
if (body.requestKind) {
const mode = body.requestKind;
// Store window size if available
if (data.windowSizeSeconds) {
windowSizes[mode] = data.windowSizeSeconds;
}
// Update the display
updateLimitDisplay(mode, data);
// Update last fetch time
lastFetchTime[mode] = Date.now();
// Reset the timer for this mode
if (timers[mode]) {
clearInterval(timers[mode]);
timers[mode] = setInterval(() => {
fetchRateLimit(mode);
}, UPDATE_INTERVAL);
}
}
} catch (e) {
console.error('Error parsing request body:', e);
}
}
}).catch(e => {
console.error('Error parsing response:', e);
});
}
} catch (e) {
console.error('Error in fetch interceptor:', e);
}
return response;
};
}
// Initialize
function init() {
// Create UI
createMonitorUI();
// Fetch initial data
refreshAllLimits();
// Schedule updates
scheduleUpdates();
// Intercept fetch requests
interceptFetch();
}
// Start the script when the page is fully loaded
window.addEventListener('load', init);
})();
由 LinuxDo
Megasoft
开发
夸克网盘自动转存
脚本具备签到、自动转存、文件命名整理、推送提醒和媒体库刷新等功能,旨在简化用户对持续更新资源的管理
软考达人:软件设计师 (软考中级)备考资源库
一个在线资源库,它提供了全面的2025年软件设计师(软考中级)备考资源。该项目自2020年起免费维护,帮助超过8万人备考。从2024年3月11日起,项目决定不再在公众号上免费分享资料,而是通过链接提供最新全套资料。资源库包含视频、真题解析、官方教材、模拟卷、其他资料及笔记、课件讲解资料、机考讲解及模拟和考试报名流程等内容
Grok Account Helper:Grok账号自由切换+额度查询
一款专为Grok用户设计的Chrome扩展,它能够帮助您轻松管理多个Grok账号、一键切换账号、实时监控API使用额度,并支持账号数据的导入导出,提升您的工作效率和使用体验
Glance:信息聚合仪表盘
一个自托管的仪表板,旨在将所有信息流集中在一个界面上。它以轻量级、快速加载、高度可定制化和移动设备优化等特点,为用户提供了一个集中查看RSS订阅、社交媒体帖子、天气、市场行情等多种信息的平台。用户可以通过YAML文件配置仪表板,创建自定义小部件和主题,并支持多种操作系统和架构
HexHub:SSH工具
一款集成了数据库、SSH、SFTP功能的桌面GUI工具,其更新主要聚焦于提升用户体验、性能优化、新增功能以及修复已知问题。更新内容涵盖了数据库管理、SSH连接、SFTP文件传输等多个方面
Mem Reduct:内存清理工具
一款实时内存管理工具,旨在监控和优化计算机上的系统内存使用。该工具通过使用未公开的内部系统功能(Native API)来清除系统缓存,从而减少10-50%的内存使用。它与Windows XP SP3及更高版本的操作系统兼容,但一些功能仅从Windows Vista开始可用
ImTip 智能桌面助手:智能桌面助手软件
一款轻量级的智能桌面助手软件,大小仅为824 KB,提供输入跟踪提示、超级热键和AI助手功能,旨在提升用户在各种桌面应用中的输入效率和便捷性。软件兼容多个Windows操作系统,无需外部依赖,支持自定义外观和配置,同时具备极低的CPU占用率
Breeze Shell:Windows 10 和 Windows 11 的替代右键菜单
一个为 Windows 10 和 Windows 11 设计的替代上下文菜单,旨在通过动画和可配置性提升 Windows 用户的体验。它具备流畅的动画效果、可扩展性、可配置性和轻量快速的特点,支持用户自定义和开发者贡献插件
GeekDesk 极客桌面:快速启动工具
一款小巧、美观的桌面快速启动工具,集成了 Everything 搜索功能。该工具以免费、美观和高度定制化为特点,并致力于在这些方向上发展。用户可以提出建议,并且如果喜欢 GeekDesk,可以通过购买作者推荐的抗脱发洗发水或在 GitHub 和 Gitee 上为作者点亮星星来支持。GeekDesk 还集成了全局快捷键、一键呼出、鼠标跟随等功能,并允许用户自定义壁纸、界面效果和菜单图标
>> 🐱跟着大橘随便看看
- Supa Simple Socket:简单易用的WebSocket客户端工具
- CSS FlexCode:快捷生成CSS Flex布局与Grid布局代码的VS Code插件
- 把微信的 OCR 功能提取出来做 Docker 服务
几个 Telegram 机器人
:
- Grak官方机器人:
@GrokAI
- 聊天机器人:
@BellmanChatbot
- Spotify下载:
@Spotify_downloa2_bot
- 解除复制:
@GetAnyMessageRobot
- 私聊创建机器人:
@No_PmsRoBot