作者: kukey-admin

  • Make Project,Make Selected Modules,Clean Project,Rebuild Project,Build APK,Generate Signed APK

    android studio里面

    Make Project:编译Project下所有Module,一般是自上次编译后Project下有更新的文件,增量编译,不生成Apk。

    Make Selected Modules:编译指定的Module,一般是自上次编译后Module下有更新的文件,增量编译,不生成Apk。

    Clean Project:删除之前编译后的编译文件。部分版本的AS会自动重新编译整个Project,不生成Apk。

    Rebuild Project:先执行Clean操作,删除之前编译的编译文件和可执行文件,然后重新编译新的编译文件,不生成Apk

    Build APK:前面4个选项都是编译,没有生成apk文件[旧版本AS,新版本的AS会自动生成debug.apk],如果想生成Apk,需要点击Build APK。

    Generate Signed APK:生成有签名的Apk(一般项目嵌入第三方,生成release包时必须混淆,否则无法生成Apk)。
    ————————————————

                                版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
                            
    原文链接:https://blog.csdn.net/jiang877864109/article/details/80406712

  • 如果打不开android studio

    如果打不开android studio,双击也不行,以管理员身份也不行的话,

    先去任务管理器杀掉android studio进程,然后在android studio安装目录找到

    studio64.exe.vmoptions

    使用记事本方式打开它,

    -XX:ReservedCodeCacheSize=512m

    把512m数值改大一点,

    我这里改成1024m,这样就能打开了,

    ReservedCodeCacheSize 中文意思是:保留代码缓存大小.

    来源:https://blog.csdn.net/qq_41998504/article/details/128804658

    如果你的文件里有这样的一行可以删除掉【如果有】

    -XX:+UseCodeCacheFlushing 

    如果你的系统是32位的,只要改studio.exe.vmoptions,

    同样如果是64位的,就改studio64.exe.vmoptions,

  • windows-python3.8.5安装kivy2.3.0

    我的电脑信息是win10,64位系统:
    OS 名称:Microsoft Windows 10 专业版
    系统类型:x64-based PC

    总共就3条命令

    pip3.8 install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
    
    pip3.8 install kivy.deps.gstreamer --extra-index-url https://kivy.org/downloads/packages/simple/
    
    python38 -m pip install kivy
    

    以下是完整的安装日志:

    C:\Users\rkey>pip3.8 install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
    Collecting docutils
      Downloading docutils-0.20.1-py3-none-any.whl (572 kB)
         |████████████████████████████████| 572 kB 1.1 MB/s
    Collecting pygments
      Downloading pygments-2.18.0-py3-none-any.whl (1.2 MB)
         |████████████████████████████████| 1.2 MB 6.8 MB/s
    Collecting pypiwin32
      Downloading pypiwin32-223-py3-none-any.whl (1.7 kB)
    Collecting kivy.deps.sdl2
      Downloading kivy_deps.sdl2-0.8.0-cp38-cp38-win_amd64.whl (4.2 MB)
         |████████████████████████████████| 4.2 MB ...
    Collecting kivy.deps.glew
      Downloading kivy_deps.glew-0.3.1-cp38-cp38-win_amd64.whl (123 kB)
         |████████████████████████████████| 123 kB ...
    Collecting pywin32>=223
      Downloading pywin32-308-cp38-cp38-win_amd64.whl (6.6 MB)
         |████████████████████████████████| 6.6 MB ...
    Installing collected packages: docutils, pygments, pywin32, pypiwin32, kivy.deps.sdl2, kivy.deps.glew
    Successfully installed docutils-0.20.1 kivy.deps.glew kivy.deps.sdl2 pygments-2.18.0 pypiwin32-223 pywin32-308
    WARNING: You are using pip version 20.1.1; however, version 24.3.1 is available.
    You should consider upgrading via the 'c:\application\python\python38\python.exe -m pip install --upgrade pip' command.
    
    C:\Users\rkey>pip3.8 install kivy.deps.gstreamer --extra-index-url https://kivy.org/downloads/packages/simple/
    Looking in indexes: https://pypi.org/simple, https://kivy.org/downloads/packages/simple/
    Collecting kivy.deps.gstreamer
      Downloading kivy_deps.gstreamer-0.3.4-cp38-cp38-win_amd64.whl (141.2 MB)
         |████████████████████████████████| 141.2 MB 6.4 MB/s
    Installing collected packages: kivy.deps.gstreamer
    Successfully installed kivy.deps.gstreamer
    WARNING: You are using pip version 20.1.1; however, version 24.3.1 is available.
    You should consider upgrading via the 'c:\application\python\python38\python.exe -m pip install --upgrade pip' command.
    
    python38 -m pip install kivy
    Collecting kivy
      Downloading Kivy-2.3.0-cp38-cp38-win_amd64.whl (4.6 MB)
         |████████████████████████████████| 4.6 MB 1.1 MB/s
    Collecting Kivy-Garden>=0.1.4
      Downloading Kivy_Garden-0.1.5-py3-none-any.whl (4.6 kB)
    Requirement already satisfied: docutils in c:\application\python\python38\lib\site-packages (from kivy) (0.20.1)
    Requirement already satisfied: kivy-deps.glew~=0.3.1; sys_platform == "win32" in c:\application\python\python38\lib\site-packages (from kivy) (0.3.1)
    Collecting kivy-deps.sdl2~=0.7.0; sys_platform == "win32"
      Downloading kivy_deps.sdl2-0.7.0-cp38-cp38-win_amd64.whl (3.5 MB)
         |████████████████████████████████| 3.5 MB ...
    Requirement already satisfied: pygments in c:\application\python\python38\lib\site-packages (from kivy) (2.18.0)
    Requirement already satisfied: pypiwin32; sys_platform == "win32" in c:\application\python\python38\lib\site-packages (from kivy) (223)
    Collecting kivy-deps.angle~=0.4.0; sys_platform == "win32"
      Downloading kivy_deps.angle-0.4.0-cp38-cp38-win_amd64.whl (5.1 MB)
         |████████████████████████████████| 5.1 MB ...
    Requirement already satisfied: requests in c:\application\python\python38\lib\site-packages (from Kivy-Garden>=0.1.4->kivy) (2.32.3)
    Requirement already satisfied: pywin32>=223 in c:\application\python\python38\lib\site-packages (from pypiwin32; sys_platform == "win32"->kivy) (308)
    Requirement already satisfied: charset-normalizer<4,>=2 in c:\application\python\python38\lib\site-packages (from requests->Kivy-Garden>=0.1.4->kivy) (3.4.0)
    Requirement already satisfied: idna<4,>=2.5 in c:\application\python\python38\lib\site-packages (from requests->Kivy-Garden>=0.1.4->kivy) (3.10)
    Requirement already satisfied: certifi>=2017.4.17 in c:\application\python\python38\lib\site-packages (from requests->Kivy-Garden>=0.1.4->kivy) (2024.8.30)
    Requirement already satisfied: urllib3<3,>=1.21.1 in c:\application\python\python38\lib\site-packages (from requests->Kivy-Garden>=0.1.4->kivy) (2.2.3)
    Installing collected packages: Kivy-Garden, kivy-deps.sdl2, kivy-deps.angle, kivy
      Attempting uninstall: kivy-deps.sdl2
        Found existing installation: kivy-deps.sdl2 0.8.0
        Uninstalling kivy-deps.sdl2-0.8.0:
          Successfully uninstalled kivy-deps.sdl2-0.8.0
    Successfully installed Kivy-Garden-0.1.5 kivy-2.3.0 kivy-deps.angle-0.4.0 kivy-deps.sdl2-0.7.0
    WARNING: You are using pip version 20.1.1; however, version 24.3.1 is available.
    You should consider upgrading via the 'C:\application\Python\Python38\python38.exe -m pip install --upgrade pip' command.

  • css改变字体的例子

    你可以试试如果删掉其中的一个字体,然后刷新浏览器看看效果.

    <!DOCTYPE html>
    <html>
    <head>
    <title>Page Title</title>
    </head>
    <body>
    
    <h1>This is a Heading</h1>
    <p>This is a paragraph.</p>
    <p>你好你好.</p>
    </body>
    </html>
    <style>
    body {
    font-family: 'SimSun', 'Source Han Sans', 'PingFang SC', 'HarmonyOS Sans SC', 'HONOR Sans', 'OPPO Sans', 'Mi Sans', 'DaiDi Hei', 'Taobao Maicai', 'ShiYanWuHei', 'Coral', sans-serif;
    }
    </style>
    

  • wordpress安装Argon主题之后,编辑器里数字0显示为小写的o,不想要

    需要修改wordpress几个地方:

    /www/wwwroot/你的网站目录名/wp-content/themes/argon/theme-update-checker/css/puc-debug-bar.css

    /www/wwwroot/你的网站目录名/wp-content/themes/argonstyle.css

    /www/wwwroot/你的网站目录名/wp-includes/js/tinymce/skins/wordpress/wp-content.css

    使用宝塔面板自带的文本编辑器,ctrl+F输入Georgia,上面每个文件里的这个字符串删掉,然后ctrl+F5强制刷新浏览器网页即可.

    (这两个组合键是这么用:

    搜索快捷键:ctrl按住不松手,另一只手按下松开F键,然后松开ctrl.

    强制刷新网页:同样的,ctrl按住不松手,另一只手按下松开F5键,然后松开ctrl.

    )

    这里我放两张图片,有一张图片没截图,就不重新弄了.

  • python3.13安装briefcase0.3.20

    日志:

    C:\Users\rkey>pip install briefcase
    Collecting briefcase
    Downloading briefcase-0.3.20-py3-none-any.whl.metadata (5.7 kB)
    Requirement already satisfied: packaging>=22.0 in c:\application\python\python313\lib\site-packages (from briefcase) (24.2)
    Requirement already satisfied: pip>=23.1.2 in c:\application\python\python313\lib\site-packages (from briefcase) (24.2)
    Requirement already satisfied: setuptools>=60 in c:\application\python\python313\lib\site-packages (from briefcase) (75.5.0)
    Collecting wheel>=0.37 (from briefcase)
    Downloading wheel-0.45.1-py3-none-any.whl.metadata (2.3 kB)
    Collecting build>=0.10 (from briefcase)
    Downloading build-1.2.2.post1-py3-none-any.whl.metadata (6.5 kB)
    Collecting cookiecutter<3.0,>=2.6.0 (from briefcase)
    Downloading cookiecutter-2.6.0-py3-none-any.whl.metadata (7.3 kB)
    Collecting GitPython<4.0,>=3.1 (from briefcase)
    Downloading GitPython-3.1.43-py3-none-any.whl.metadata (13 kB)
    Collecting platformdirs<5.0,>=2.6 (from briefcase)
    Downloading platformdirs-4.3.6-py3-none-any.whl.metadata (11 kB)
    Collecting psutil<7.0,>=5.9 (from briefcase)
    Downloading psutil-6.1.0-cp37-abi3-win_amd64.whl.metadata (23 kB)
    Requirement already satisfied: python-dateutil>=2.9.0.post0 in c:\application\python\python313\lib\site-packages (from briefcase) (2.9.0.post0)
    Requirement already satisfied: requests<3.0,>=2.28 in c:\application\python\python313\lib\site-packages (from briefcase) (2.32.3)
    Collecting rich<14.0,>=12.6 (from briefcase)
    Downloading rich-13.9.4-py3-none-any.whl.metadata (18 kB)
    Collecting tomli-w<2.0,>=1.0 (from briefcase)
    Downloading tomli_w-1.1.0-py3-none-any.whl.metadata (5.7 kB)
    Collecting pyproject_hooks (from build>=0.10->briefcase)
    Downloading pyproject_hooks-1.2.0-py3-none-any.whl.metadata (1.3 kB)
    Requirement already satisfied: colorama in c:\application\python\python313\lib\site-packages (from build>=0.10->briefcase) (0.4.6)
    Collecting binaryornot>=0.4.4 (from cookiecutter<3.0,>=2.6.0->briefcase)
    Downloading binaryornot-0.4.4-py2.py3-none-any.whl.metadata (6.0 kB)
    Requirement already satisfied: Jinja2<4.0.0,>=2.7 in c:\application\python\python313\lib\site-packages (from cookiecutter<3.0,>=2.6.0->briefcase) (3.1.4)
    Requirement already satisfied: click<9.0.0,>=7.0 in c:\application\python\python313\lib\site-packages (from cookiecutter<3.0,>=2.6.0->briefcase) (8.1.7)
    Collecting pyyaml>=5.3.1 (from cookiecutter<3.0,>=2.6.0->briefcase)
    Downloading PyYAML-6.0.2-cp313-cp313-win_amd64.whl.metadata (2.1 kB)
    Collecting python-slugify>=4.0.0 (from cookiecutter<3.0,>=2.6.0->briefcase)
    Downloading python_slugify-8.0.4-py2.py3-none-any.whl.metadata (8.5 kB)
    Collecting arrow (from cookiecutter<3.0,>=2.6.0->briefcase)
    Downloading arrow-1.3.0-py3-none-any.whl.metadata (7.5 kB)
    Collecting gitdb<5,>=4.0.1 (from GitPython<4.0,>=3.1->briefcase)
    Downloading gitdb-4.0.11-py3-none-any.whl.metadata (1.2 kB)
    Requirement already satisfied: six>=1.5 in c:\application\python\python313\lib\site-packages (from python-dateutil>=2.9.0.post0->briefcase) (1.16.0)
    Requirement already satisfied: charset-normalizer<4,>=2 in c:\application\python\python313\lib\site-packages (from requests<3.0,>=2.28->briefcase) (3.4.0)
    Requirement already satisfied: idna<4,>=2.5 in c:\application\python\python313\lib\site-packages (from requests<3.0,>=2.28->briefcase) (3.10)
    Requirement already satisfied: urllib3<3,>=1.21.1 in c:\application\python\python313\lib\site-packages (from requests<3.0,>=2.28->briefcase) (2.2.3)
    Requirement already satisfied: certifi>=2017.4.17 in c:\application\python\python313\lib\site-packages (from requests<3.0,>=2.28->briefcase) (2024.8.30)
    Collecting markdown-it-py>=2.2.0 (from rich<14.0,>=12.6->briefcase)
    Downloading markdown_it_py-3.0.0-py3-none-any.whl.metadata (6.9 kB)
    Collecting pygments<3.0.0,>=2.13.0 (from rich<14.0,>=12.6->briefcase)
    Downloading pygments-2.18.0-py3-none-any.whl.metadata (2.5 kB)
    Collecting chardet>=3.0.2 (from binaryornot>=0.4.4->cookiecutter<3.0,>=2.6.0->briefcase)
    Downloading chardet-5.2.0-py3-none-any.whl.metadata (3.4 kB)
    Collecting smmap<6,>=3.0.1 (from gitdb<5,>=4.0.1->GitPython<4.0,>=3.1->briefcase)
    Downloading smmap-5.0.1-py3-none-any.whl.metadata (4.3 kB)
    Requirement already satisfied: MarkupSafe>=2.0 in c:\application\python\python313\lib\site-packages (from Jinja2<4.0.0,>=2.7->cookiecutter<3.0,>=2.6.0->briefcase) (3.0.2)
    Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich<14.0,>=12.6->briefcase)
    Downloading mdurl-0.1.2-py3-none-any.whl.metadata (1.6 kB)
    Collecting text-unidecode>=1.3 (from python-slugify>=4.0.0->cookiecutter<3.0,>=2.6.0->briefcase)
    Downloading text_unidecode-1.3-py2.py3-none-any.whl.metadata (2.4 kB)
    Collecting types-python-dateutil>=2.8.10 (from arrow->cookiecutter<3.0,>=2.6.0->briefcase)
    Downloading types_python_dateutil-2.9.0.20241003-py3-none-any.whl.metadata (1.9 kB)
    Downloading briefcase-0.3.20-py3-none-any.whl (234 kB)
    Downloading build-1.2.2.post1-py3-none-any.whl (22 kB)
    Downloading cookiecutter-2.6.0-py3-none-any.whl (39 kB)
    Downloading GitPython-3.1.43-py3-none-any.whl (207 kB)
    Downloading platformdirs-4.3.6-py3-none-any.whl (18 kB)
    Downloading psutil-6.1.0-cp37-abi3-win_amd64.whl (254 kB)
    Downloading rich-13.9.4-py3-none-any.whl (242 kB)
    Downloading tomli_w-1.1.0-py3-none-any.whl (6.4 kB)
    Downloading wheel-0.45.1-py3-none-any.whl (72 kB)
    Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
    Downloading gitdb-4.0.11-py3-none-any.whl (62 kB)
    Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
    Downloading pygments-2.18.0-py3-none-any.whl (1.2 MB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 11.6 MB/s eta 0:00:00
    Downloading python_slugify-8.0.4-py2.py3-none-any.whl (10 kB)
    Downloading PyYAML-6.0.2-cp313-cp313-win_amd64.whl (156 kB)
    Downloading arrow-1.3.0-py3-none-any.whl (66 kB)
    Downloading pyproject_hooks-1.2.0-py3-none-any.whl (10 kB)
    Downloading chardet-5.2.0-py3-none-any.whl (199 kB)
    Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
    Downloading smmap-5.0.1-py3-none-any.whl (24 kB)
    Downloading text_unidecode-1.3-py2.py3-none-any.whl (78 kB)
    Downloading types_python_dateutil-2.9.0.20241003-py3-none-any.whl (9.7 kB)
    Installing collected packages: text-unidecode, wheel, types-python-dateutil, tomli-w, smmap, pyyaml, python-slugify, pyproject_hooks, pygments, psutil, platformdirs, mdurl, chardet, markdown-it-py, gitdb, build, binaryornot, arrow, rich, GitPython, cookiecutter, briefcase
    Successfully installed GitPython-3.1.43 arrow-1.3.0 binaryornot-0.4.4 briefcase-0.3.20 build-1.2.2.post1 chardet-5.2.0 cookiecutter-2.6.0 gitdb-4.0.11 markdown-it-py-3.0.0 mdurl-0.1.2 platformdirs-4.3.6 psutil-6.1.0 pygments-2.18.0 pyproject_hooks-1.2.0 python-slugify-8.0.4 pyyaml-6.0.2 rich-13.9.4 smmap-5.0.1 text-unidecode-1.3 tomli-w-1.1.0 types-python-dateutil-2.9.0.20241003 wheel-0.45.1

    [notice] A new release of pip is available: 24.2 -> 24.3.1
    [notice] To update, run: python.exe -m pip install –upgrade pip

  • python3.13安装celery5.4.0

    安装日志

    C:\Users\rkey>pip install celery
    Collecting celery
    Downloading celery-5.4.0-py3-none-any.whl.metadata (21 kB)
    Collecting billiard<5.0,>=4.2.0 (from celery)
    Downloading billiard-4.2.1-py3-none-any.whl.metadata (4.4 kB)
    Collecting kombu<6.0,>=5.3.4 (from celery)
    Downloading kombu-5.4.2-py3-none-any.whl.metadata (3.2 kB)
    Collecting vine<6.0,>=5.1.0 (from celery)
    Downloading vine-5.1.0-py3-none-any.whl.metadata (2.7 kB)
    Requirement already satisfied: click<9.0,>=8.1.2 in c:\application\python\python313\lib\site-packages (from celery) (8.1.7)
    Collecting click-didyoumean>=0.3.0 (from celery)
    Downloading click_didyoumean-0.3.1-py3-none-any.whl.metadata (3.9 kB)
    Collecting click-repl>=0.2.0 (from celery)
    Downloading click_repl-0.3.0-py3-none-any.whl.metadata (3.6 kB)
    Collecting click-plugins>=1.1.1 (from celery)
    Downloading click_plugins-1.1.1-py2.py3-none-any.whl.metadata (6.4 kB)
    Requirement already satisfied: tzdata>=2022.7 in c:\application\python\python313\lib\site-packages (from celery) (2024.2)
    Requirement already satisfied: python-dateutil>=2.8.2 in c:\application\python\python313\lib\site-packages (from celery) (2.9.0.post0)
    Requirement already satisfied: colorama in c:\application\python\python313\lib\site-packages (from click<9.0,>=8.1.2->celery) (0.4.6)
    Collecting prompt-toolkit>=3.0.36 (from click-repl>=0.2.0->celery)
    Downloading prompt_toolkit-3.0.48-py3-none-any.whl.metadata (6.4 kB)
    Collecting amqp<6.0.0,>=5.1.1 (from kombu<6.0,>=5.3.4->celery)
    Downloading amqp-5.3.1-py3-none-any.whl.metadata (8.9 kB)
    Requirement already satisfied: six>=1.5 in c:\application\python\python313\lib\site-packages (from python-dateutil>=2.8.2->celery) (1.16.0)
    Collecting wcwidth (from prompt-toolkit>=3.0.36->click-repl>=0.2.0->celery)
    Downloading wcwidth-0.2.13-py2.py3-none-any.whl.metadata (14 kB)
    Downloading celery-5.4.0-py3-none-any.whl (425 kB)
    Downloading billiard-4.2.1-py3-none-any.whl (86 kB)
    Downloading click_didyoumean-0.3.1-py3-none-any.whl (3.6 kB)
    Downloading click_plugins-1.1.1-py2.py3-none-any.whl (7.5 kB)
    Downloading click_repl-0.3.0-py3-none-any.whl (10 kB)
    Downloading kombu-5.4.2-py3-none-any.whl (201 kB)
    Downloading vine-5.1.0-py3-none-any.whl (9.6 kB)
    Downloading amqp-5.3.1-py3-none-any.whl (50 kB)
    Downloading prompt_toolkit-3.0.48-py3-none-any.whl (386 kB)
    Downloading wcwidth-0.2.13-py2.py3-none-any.whl (34 kB)
    Installing collected packages: wcwidth, vine, prompt-toolkit, billiard, click-repl, click-plugins, click-didyoumean, amqp, kombu, celery
    Successfully installed amqp-5.3.1 billiard-4.2.1 celery-5.4.0 click-didyoumean-0.3.1 click-plugins-1.1.1 click-repl-0.3.0 kombu-5.4.2 prompt-toolkit-3.0.48 vine-5.1.0 wcwidth-0.2.13

    [notice] A new release of pip is available: 24.2 -> 24.3.1
    [notice] To update, run: python.exe -m pip install –upgrade pip

  • python-Celery应用场景

    Celery使用场景

    1. 异步任务(函数)
      一些耗时操作交给celery执行-视频转码,邮件发送,消息推送
    2. 定时任务
      定时推送消息,定时爬取一些数据,定时统计一些数据等
    3. 延迟任务
      提交任务后,等一段时间再执行任务

     

  • C++数值转换

    #include <iostream>
    #include <string>
    #include <cmath>
    
    int main() {
    	// 数字转字符串
    	int num = 123;
    	std::string strNum = std::to_string(num);
    	std::cout << "数字转字符串: " << strNum << std::endl;
    	
    	// 字符转数字
    	std::string strInt = "456";
    	int intNum = std::stoi(strInt);
    	std::cout << "字符转数字: " << intNum << std::endl;
    	
    	// 字符转浮点数
    	std::string strFloat = "789.01";
    	float floatNum = std::stof(strFloat);
    	std::cout << "字符转浮点数: " << floatNum << std::endl;
    	
    	// 浮点数转字符
    	float floatNum2 = 123.45f;
    	std::string strFloat2 = std::to_string(floatNum2);
    	std::cout << "浮点数转字符: " << strFloat2 << std::endl;
    	
    	// 双精度转字符
    	double doubleNum = 123.456;
    	std::string strDouble = std::to_string(doubleNum);
    	std::cout << "双精度转字符: " << strDouble << std::endl;
    	
    	// 字符转双精度
    	std::string strDouble2 = "789.101";
    	double doubleNum2 = std::stod(strDouble2);
    	std::cout << "字符转双精度: " << doubleNum2 << std::endl;
    	
    	return 0;
    }

     

  • 油猴js脚本-自动修改百度贴吧域名jump2.bdim为tieba.baidu

    // ==UserScript==
    // @name 自动修改百度贴吧域名jump2.bdim为tieba.baidu
    // @namespace http://tampermonkey.net/
    // @version 2024-11-12
    // @description 自动修改百度贴吧域名jump2.bdim为tieba.baidu
    // @author rkey
    // @match https://jump2.bdimg.com/*
    // @icon https://www.google.com/s2/favicons?sz=64&domain=bdimg.com
    // @grant none
    // ==/UserScript==

    (function() {
    ‘use strict’;
    getUrl();
    // Your code here…
    })();

    function getUrl(){
    var url = window.location.href;
    console.log(“当前网址是:”+url); // 输出应该会类似这样:http://example.com/page.html
    var newStr = url.replace(“jump2.bdimg”, “tieba.baidu”);
    console.log(“当前修改后的网址是:”+newStr);
    window.location.href = newStr;
    }