Skip to content

Instantly share code, notes, and snippets.

View Redwinam's full-sized avatar
🎓
I'm the Queen of the world.

千啾略 Redwinam

🎓
I'm the Queen of the world.
View GitHub Profile
@Redwinam
Redwinam / chatgpt_paste_helper.js
Created May 16, 2025 12:14
ChatGPT粘贴助手
(function () {
// --- Selectors for ChatGPT ---
const targetTextAreaSelector = "#prompt-textarea"; // contenteditable div
const sendButtonSelector = "#composer-submit-button";
// A relatively positioned ancestor of the textarea, suitable for placing controls
const controlsParentSelector = "div.relative.flex.w-full.items-end.px-3.py-3";
// --- End Selectors ---
const pasteButtonId = "chatgpt-custom-paste-button";
const pasteAndSendSwitchId = "chatgpt-paste-and-send-switch";
@Redwinam
Redwinam / ceweilai_frame_copy.js
Created May 13, 2025 11:40
策未来视频截图
// 样式定义
const STYLES = {
screenshotBtn: `
.screenshot-btn {
position: fixed;
bottom: 20px;
right: 20px;
padding: 10px 20px;
background-color: #ff9800;
color: white;
@Redwinam
Redwinam / zhihuishu_video_control.js
Created May 13, 2025 11:39
智慧树视频控制
(function () {
// --- 配置 ---
const SEEK_STEP = 5; // 每次快进/快退的秒数
const SPEED_STEP = 0.25; // 每次速度调整的幅度
const MIN_SPEED = 0.5; // 最小播放速度
const MAX_SPEED = 4.0; // 最大播放速度
const CHECK_INTERVAL = 500; // 每隔多少毫秒检查一次播放器是否加载 (0.5秒)
const MAX_CHECKS = 20; // 最多检查多少次 (10秒)
// --- 配置结束 ---
@Redwinam
Redwinam / yuanbao_paste_helper.js
Last active May 13, 2025 17:30
元宝输入框一键粘贴
(function () {
// 目标文本输入区域的选择器
const targetTextAreaSelector = 'div.ql-editor[contenteditable="true"]';
const pasteButtonId = "arc-custom-paste-button";
const pasteAndSendSwitchId = "arc-paste-and-send-switch";
const controlsWrapperId = "arc-custom-controls-wrapper";
const sendButtonSelector = "a.style__send-btn___ZsLmU"; // 发送按钮的选择器
function addPasteButton() {
const targetTextArea = document.querySelector(targetTextAreaSelector);
@Redwinam
Redwinam / chatgpt_paste_script.js
Last active February 7, 2025 17:52
Coursera 一键复制字幕、标题按钮脚本(Arc Browser)
window.addEventListener("DOMContentLoaded", function () {
// 检查是否在 ChatGPT 页面
if (window.location.href.includes("chat.openai.com") || window.location.href.includes("chatgpt.com")) {
// 添加按钮样式
const style = document.createElement("style");
style.textContent = `
.paste-format-btn {
position: fixed;
left: 20px;
bottom: 20px;