library icon indicating copy to clipboard operation
library copied to clipboard

gitcode 或者gitee 也镜像一份呗,解决查看github例子 间歇性打不开

Open jingjingxyk opened this issue 2 years ago • 1 comments

缘由:文档中 https://github.com/swoole/library/blob/master/src/core/Coroutine/WaitGroup.php 中的例子,点击链接,间歇性打不开。 解决办法:使用代理 、或者使用镜像

最佳方案: 使用镜像

这个也需要镜像 : https://github.com/swoole/docs.git (查看例子方便)

jingjingxyk avatar Aug 01 '23 15:08 jingjingxyk

为了方便使用可以借助浏览器扩展ReplaceGoogleCDN 的自定义规则功能,自动跳转到镜像文档

如下规则例子:

github.com/swoole/swoole-src 自动跳转到镜像 gitee.com/swoole/swoole

[
  {
    "action": {
      "redirect": {
        "regexSubstitution": "gitee.com/swoole/swoole\\1"
      },
      "type": "redirect"
    },
    "condition": {
      "regexFilter": "github\\.com/swoole/swoole-src(.*?)",
      "requestDomains": [
        "github.com"
      ],
      "resourceTypes": [
        "main_frame",
        "sub_frame",
        "stylesheet",
        "script",
        "image",
        "font",
        "object",
        "xmlhttprequest",
        "ping",
        "csp_report",
        "media",
        "websocket",
        "other"
      ]
    },
    "id": 20022,
    "priority": 1000
  }
]

github.com/swoole/swoole-cli 自动跳转到镜像 gitee.com/swoole/swoole-cli

[
  {
    "action": {
      "redirect": {
        "regexSubstitution": "gitee.com/swoole/swoole-cli\\1"
      },
      "type": "redirect"
    },
    "condition": {
      "regexFilter": "github\\.com/swoole/swoole-cli(.*?)",
      "requestDomains": [
        "github.com"
      ],
      "resourceTypes": [
        "main_frame",
        "sub_frame",
        "stylesheet",
        "script",
        "image",
        "font",
        "object",
        "xmlhttprequest",
        "ping",
        "csp_report",
        "media",
        "websocket",
        "other"
      ]
    },
    "id": 20021,
    "priority": 1000
  }
]

jingjingxyk avatar Aug 01 '23 16:08 jingjingxyk