Skip to content

Instantly share code, notes, and snippets.

@xubai2001
xubai2001 / user-rules.json
Last active April 18, 2025 09:57
immersivetranslate user rules
[
{
"matches": [
"www.nexusmods.com",
"next.nexusmods.com"
],
"selectors": [
"[class=\"tile-name\"]",
"[class=\"container mod_description_container condensed \"]",
"[class=\"comment-content-text\"]",
@xubai2001
xubai2001 / 302拦截.js
Last active October 17, 2024 05:12
Surge script
// 检查响应状态码是否是 302
if ($response.status === 302) {
// 获取 Location 重定向的 URL
let locationUrl = $response.headers['Location'];
locationUrl =decodeURIComponent(escape(locationUrl));
const jsonResult = {"url": locationUrl};
$done({
@xubai2001
xubai2001 / BigModelTranslator.js
Last active April 17, 2025 12:41
xubai的仓输入法脚本
// author: 叙白
// date: 2025-01-18
// name: BigModelTranslator.js
// 注意:请在脚本中的变量功能中添加 bigmodel_key 变量,值为 BigModel 的 API Key
const BASE_URL = "https://open.bigmodel.cn/api/paas/v4/chat/completions";
const DEFAULT_MODEL = "glm-4-flash";
const DEFAULT_TEMPERATURE = 0.1;
/**