爱意满满的作品展示区。
cnit

github trending markdown 项目屏蔽的油猴脚本

  •  
  •   cnit · Dec 23, 2021 · 2476 views
    This topic created in 1621 days ago, the information mentioned may be changed or developed.



    if(isChinese(contents[j].path) || contents[j].path.split('.')[1]==='md'

    这行有 bug ,来个大佬完善下
    3 replies    2021-12-24 14:05:12 +08:00
    xiaoming1992
        1
    xiaoming1992  
       Dec 24, 2021 via Android
    可以用 URL 来处理网址吧,比什么 split [1] 要好,但是 path 是否需要 decodeURI ?还有为什么含有中文的就要 remove ?
    nekoneko
        2
    nekoneko  
       Dec 24, 2021
    遇到 a.b.c.e.f.md
    不就完蛋了吗
    cnit
        3
    cnit  
    OP
       Dec 24, 2021
    @xiaoming1992 @nekoneko 哈哈,昨天下午划水写的,确实可以用 URL 跟 endsWith 优化下,
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5576 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 07:43 · PVG 15:43 · LAX 00:43 · JFK 03:43
    ♥ Do have faith in what you're doing.