分类 默认分类 下的文章

安装插件 Replace Rules

设置插件

  // settings.json
"replacerules.rules": {
    "1_去除所有空格": {
        "find": "[  \\t]", 
        "replace": "",
        "isRegex": true
    },
    "2_去除所有空行": {
        "find": "^\\s*\\n", 
        "replace": "",
        "isRegex": true
    },
    "3_直角引号统一初始化": {
        // 先把所有乱七八糟的单/双直角引号全部打碎,统一和英文双引一起处理
        "find": "[『』「」]", 
        "replace": "\"",  
        "isRegex": true
    },
    "4_英文双引精准配对": {
        // 核心修正:捕获每行内任意成对出现的双引号,强制规范为前“后”
        "find": "\"([^\"]+?)\"", 
        "replace": "“$1”",
        "isRegex": true
    },
    "5_英文单引精准配对": {
        // 同理,精准捕获行内成对出现的单引号,规范为前‘后’
        "find": "'([^']+?)'",
        "replace": "‘$1’",
        "isRegex": true
    },
    "6_智能修复单边漏网之鱼_左": {
        // 针对文字左侧被误伤或落单的反引号,强行修正为左引号
        "find": "”(?=[\\u4e00-\\u9fa5\\w])",
        "replace": "“",
        "isRegex": true
    },
    "7_智能修复单边漏网之鱼_右": {
        // 针对文字右侧、或者紧跟在标点(如。,、?!)后面的左引号,强行修正为右引号
        "find": "“(?=[。,、?!…])|(?<=[\\u4e00-\\u9fa5\\w])“",
        "replace": "”",
        "isRegex": true
    },
    "8_段首精准缩进2字符": {
        "find": "^(?=\\S)", 
        "replace": "  ",    
        "isRegex": true
    },
    "9_中文左引号替换英文引号": {
        "find": "“", 
        "replace": "\"",    
        "isRegex": false
    },
    "10_中文右引号替换英文引号": {
        "find": "”", 
        "replace": "\"",    
        "isRegex": false
    },
    "11_英文引号替换中文引号": {
        "find": "\"(.*?)\"", 
        "replace": "“$1”",    
        "isRegex": true
    },
    "12_全角转半角": {
        "find": [
            // 全角大写字母 A-Z
            "A","B","C","D","E","F","G","H","I","J","K","L","M",
            "N","O","P","Q","R","S","T","U","V","W","X","Y","Z",
            // 全角小写字母 a-z
            "a","b","c","d","e","f","g","h","i","j","k","l","m",
            "n","o","p","q","r","s","t","u","v","w","x","y","z",
            // 全角数字 0-9
            "0","1","2","3","4","5","6","7","8","9",
            // 全角符号(对应 ASCII 可打印字符)
            "!",""","#","$","%","&","'","(",")","*","+",",","-",".","/",
            ":",";","<","=",">","?","@",
            "[","\","]","^","_","`",
            "{","|","}","~",
            // 全角空格
            " "
        ],
        "replace": [
            // 半角大写
            "A","B","C","D","E","F","G","H","I","J","K","L","M",
            "N","O","P","Q","R","S","T","U","V","W","X","Y","Z",
            // 半角小写
            "a","b","c","d","e","f","g","h","i","j","k","l","m",
            "n","o","p","q","r","s","t","u","v","w","x","y","z",
            // 半角数字
            "0","1","2","3","4","5","6","7","8","9",
            // 半角符号
            "!","\"","#","$","%","&","'","(",")","*","+",",","-",".","/",
            ":",";","<","=",">","?","@",
            "[","\\","]","^","_","`",
            "{","|","}","~",
            // 半角空格
            " "
        ]
     }
},
"replacerules.rulesets": {
    "全语境标点与文章一键净化": {
        "rules": [
            "1_去除所有空格",
            "2_去除所有空行",
            "3_直角引号统一初始化",
            "4_英文双引精准配对",
            "5_英文单引精准配对",
            "6_智能修复单边漏网之鱼_左",
            "7_智能修复单边漏网之鱼_右",
            "8_段首精准缩进2字符",
            "9_中文左引号替换英文引号",
            "10_中文右引号替换英文引号",
            "11_英文引号替换中文引号",
            "12_全角转半角"
        ]
    }
},

给特定网站开放下载权限
‌操作步骤‌:打开目标下载网站,点击地址栏左侧的锁形/「i」信息图标,选择「网站设置」,找到「不安全内容」选项,将行为从「阻止」改为「允许」,刷新网页后重新下载即可。

‌批量配置‌:在地址栏输入chrome://settings/content/insecureContent,

在 「允许显示不安全内容」, 点击「添加」,

输入指定域名(如[*.]example.com),该域名下的所有下载都不会被拦截。

vi /usr/lib/lua/luci/view/sysauth.htm
<!-- 登录前 一键网络唤醒按钮 -->
<%
-- 在这里执行唤醒命令
if luci.http.formvalue("wake") then
    luci.sys.call("/usr/bin/etherwake -D -i 'br-lan' -b 'D8:5E:D3:6A:EA:5C' > /dev/null 2>&1")
end
%>

<div style="text-align:center; margin:20px auto; max-width:320px;">
    <form method="post" style="margin:0;">
        <button 
            type="submit" 
            name="wake" 
            value="wake"
            style="
                background:#007bff; 
                color:white; 
                border:none; 
                padding:12px 24px; 
                border-radius:6px; 
                font-size:16px; 
                cursor:pointer;
                width:100%;
                font-weight:bold;
            ">
            🖥️ 一键开机(网络唤醒)
        </button>
    </form>
</div>
<br>

打开powershell,输入:

$(New-Object -ComObject InternetExplorer.Application).Visible=$true

或者新建一个 .cmd 的 ANSI 编码文件,内容如下:

powershell -command "$(New-Object -ComObject InternetExplorer.Application).Visible=$true"

或者新建一个 .vbs 的 ANSI 编码文件,内容如下(Win11 可能已经失效):

CreateObject("InternetExplorer.Application").Visible = true

或者 打开 internet option ,program 标签页,click Manage add-ons ,Finally, click the Learn more about toolbars and extensions link on the left.

https://winaero.com/how-to-launch-internet-explorer-on-windows-11-if-you-really-need-it/
https://blog.csdn.net/chj_1224365967/article/details/130701129
https://freyagrace.cn/index.php/archives/289/

raw_headers = """Host: open.tool.hexun.com
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.3
Accept: */*
Referer: http://stock.hexun.com/gsxw/
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8"""
def get_headers(header_raw):
 """
 通过原生请求头获取请求头字典
 :param header_raw: {str} 浏览器请求头
 :return: {dict} headers
 """
 return dict(line.split(": ", 1) for line in header_raw.split("\n") if line != '')
def get_cookies(cookie_raw):
 """
 通过原生cookie获取cookie字段
 :param cookie_raw: {str} 浏览器原始cookie
 :return: {dict} cookies
 """
 return dict(line.split("=", 1) for line in cookie_raw.split("; "))