V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Davionwang
V2EX  ›  Apple

如何让 Safari 书签显示网站 Logo ?

  •  
  •   Davionwang · 4 天前 · 968 次点击

    有些网站有 logo ,有些是灰色的只有一个首字母。想让每个书签都显示网站 logo 。像 L 站图标就很饱满好看 https://cdn.ldstatic.com/original/4X/0/4/c/04cac7bb6f59bba46edf9bc83d4a933b48565bd2.jpeg https://cdn.ldstatic.com/original/4X/1/e/8/1e8dc9ba90752eb5a29ad73fdd6d25a99290477c.jpeg

    7 条回复    2025-03-27 16:09:46 +08:00
    reayyu
        1
    reayyu  
       4 天前
    apple-touch-icon

    有的网站有有的没有吧
    zeroskylian
        2
    zeroskylian  
       4 天前
    我之前出这个情况是点开网站等加载完就有了
    Socrazy
        3
    Socrazy  
       4 天前   ❤️ 1
    查看网页源代码,如果没有 apple-touch-icon ,写个猴子脚本修改一下页面
    先删除原来的书签,退出一下 Safari ,再重新打开网站,加载完后,检查元素,看<head></head>之间是不是已经有了 apple-touch-icon ,有了的话说明脚本已经生效,重新添加书签。


    ```
    (function () {
    'use strict';

    // Check if the meta tag for the Apple touch icon already exists
    if (!document.querySelector('link[rel="apple-touch-icon"]')) {
    // Create a new link element
    const link = document.createElement('link');
    link.rel = 'apple-touch-icon';
    link.href = 'https://is1-ssl.mzstatic.com/image/thumb/Purple221/v4/65/42/04/65420419-1b22-588b-2f55-da8a6d1a9ab0/AppIcon-0-0-1x_U007emarketing-0-0-0-11-0-0-0-85-220.png/180x180.png';

    // Add the link to the head of the document
    document.head.appendChild(link);
    }
    })();

    ```
    SakuraYuki
        4
    SakuraYuki  
       4 天前
    这个不是 favicon ,是 apple touch icon ,有的网站没设置,可以自己脚本注入
    duxiansen
        5
    duxiansen  
       4 天前
    我想知道 Safari 如果快速查看当前页面是否在收藏夹里,类似 chrome 五角星那样
    Davionwang
        6
    Davionwang  
    OP
       4 天前
    @reayyu #1 中文官网都没,汗颜。。。
    Davionwang
        7
    Davionwang  
    OP
       3 天前
    @duxiansen #5 似乎也没这个功能。顶部菜单栏选择「显示」→「显示收藏夹栏」,这个只是开启显示
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5103 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 07:36 · PVG 15:36 · LAX 00:36 · JFK 03:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.