<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Chrome - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ freeCodeCamp 是一个免费学习编程的开发者社区，涵盖 Python、HTML、CSS、React、Vue、BootStrap、JSON 教程等，还有活跃的技术论坛和丰富的社区活动，在你学习编程和找工作时为你提供建议和帮助。 ]]>
        </description>
        <link>https://www.freecodecamp.org/chinese/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Chrome - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/chinese/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Fri, 29 May 2026 20:37:14 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/chinese/news/tag/chrome/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ 如何在 Google Chrome 中启用 Adob​​e Flash Player ]]>
                </title>
                <description>
                    <![CDATA[ 原文：How to Enable Adobe Flash Player in Google Chrome [https://www.freecodecamp.org/news/how-to-enable-adobe-flash-player-in-google-chrome/] ，作者：Abbey Rennemeyer [https://www.freecodecamp.org/news/author/abbey/] 还记得 Adob​​e Flash 播放器吗？正是这款漂亮的软件可以让网站嵌入视频和网络游戏。整个网站甚至可以由 Flash 驱动。 尽管 Flash 的使用率大幅下降，并且 Adob​​e 将于 2020 年停用该软件，但某些网站今天仍在使用它。如果你遇到其中一个网站，你可能会想看看该内容是什么。 在本教程中，我们将了解在 Chrome 中启用 Flash 播放器所需遵循的步骤。 如何在 Chrome 中启用 Flash 播放器 由于 Google Chrome 会自动禁用 Flash 播放器，因此如果你希望它工作，则需要启用它。 访问内容设置 由于 Chro ]]>
                </description>
                <link>https://www.freecodecamp.org/chinese/news/how-to-enable-adobe-flash-player-in-google-chrome/</link>
                <guid isPermaLink="false">62e77dc78d13aa0845c63610</guid>
                
                    <category>
                        <![CDATA[ Chrome ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Google ]]>
                    </category>
                
                    <category>
                        <![CDATA[ 谷歌 ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Chengjun.L ]]>
                </dc:creator>
                <pubDate>Thu, 28 Jul 2022 07:20:00 +0000</pubDate>
                <media:content url="https://chinese.freecodecamp.org/news/content/images/2022/08/5f9c9f86740569d1a4ca430d.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>原文：<a href="https://www.freecodecamp.org/news/how-to-enable-adobe-flash-player-in-google-chrome/">How to Enable Adobe Flash Player in Google Chrome</a>，作者：<a href="https://www.freecodecamp.org/news/author/abbey/">Abbey Rennemeyer</a></p><p>还记得 Adob​​e Flash 播放器吗？正是这款漂亮的软件可以让网站嵌入视频和网络游戏。整个网站甚至可以由 Flash 驱动。</p><p>尽管 Flash 的使用率大幅下降，并且 Adob​​e 将于 2020 年停用该软件，但某些网站今天仍在使用它。如果你遇到其中一个网站，你可能会想看看该内容是什么。</p><p>在本教程中，我们将了解在 Chrome 中启用 Flash 播放器所需遵循的步骤。</p><h2 id="-chrome-flash-">如何在 Chrome 中启用 Flash 播放器</h2><p>由于 Google Chrome 会自动禁用 Flash 播放器，因此如果你希望它工作，则需要启用它。</p><h3 id="-">访问内容设置</h3><p>由于 Chrome 有自己的内置 Flash 版本，因此你无需安装插件或任何东西。</p><p>进入 Chrome 设置的最简单方法是访问 <a href="chrome://settings/content">chrome://settings/content</a>。一旦你在那里，向下滚动，直到你看到 Flash 播放器的选项：</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2019/09/adobe-flash-chrome-settings.png" class="kg-image" alt="adobe-flash-chrome-settings" width="600" height="400" loading="lazy"><figcaption>向下滚动到 Flash，在 JavaScript 正下方</figcaption></figure><h3 id="-flash-">允许 Flash 运行</h3><p>单击 “Flash”，然后在显示 “Block sites from running Flash (recommended) 阻止站点运行 Flash（推荐）”的位置打开开关，你会看到 “Ask first”：</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2019/09/adobe-flash-allow.png" class="kg-image" alt="adobe-flash-allow" width="600" height="400" loading="lazy"><figcaption>Flash 会询问你是否允许它运行</figcaption></figure><p>现在，当你访问使用 Flash 的站点时，它会询问你是否要允许 Flash 执行其操作。仔细检查总是好的。</p><p>恭喜 - 你已经成功了一半。</p><h2 id="-flash--1">如何授予特定站点运行 Flash 的权限</h2><p>现在你已授予 Chrome 请求你允许使用 Flash 运行网站的权限（哇），你需要告诉它允许哪些网站。</p><h3 id="-flash--2">转到你最喜欢的使用 Flash 的站点</h3><p>让我们拥抱一个小孩子般的奇迹和魔法，好吗？迪士尼的<a href="https://disneyworld.disney.go.com/destinations/magic-kingdom/">魔法王国</a>网站使用 Flash，我们希望看到所有闪闪发光的魔法善意。</p><p>导航到该站点后，在地址栏中查找小灰色锁：</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2019/09/Adobe-flash-disney-homepage.png" class="kg-image" alt="Adobe-flash-disney-homepage" width="600" height="400" loading="lazy"><figcaption>迪士尼网站当然需要漂亮的动画......</figcaption></figure><h3 id="-flash--3">更新其 Flash 设置</h3><p>单击它，然后选择底部的 “Site settings 站点设置”：</p><figure class="kg-card kg-image-card"><img src="https://www.freecodecamp.org/news/content/images/2019/09/adobe-flash-site-settings.png" class="kg-image" alt="adobe-flash-site-settings" width="600" height="400" loading="lazy"></figure><p>这将带你进入一个包含多个选项的菜单，你会看到 Flash。在右侧，你会看到一个下拉菜单，上面写着 “Block 阻止”。</p><p>要允许 Flash，你必须单击该下拉菜单并选择 “Allow 允许”：</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2019/09/adobe-flash-allow-flash.png" class="kg-image" alt="adobe-flash-allow-flash" width="600" height="400" loading="lazy"><figcaption>找到 Flash 设置并选择“允许”</figcaption></figure><p>现在，如果你再次在 Chrome 中检查你的 Flash 设置，你将在 “allowed 允许”列表中看到该站点：</p><figure class="kg-card kg-image-card"><img src="https://www.freecodecamp.org/news/content/images/2019/09/adobe-flash-enabled.png" class="kg-image" alt="adobe-flash-enabled" width="600" height="400" loading="lazy"></figure><p>返回站点并重新加载页面，所有的 Flash 内容都会运行。</p><p>注意：如果你使用的是不认识的网站，Flash 容易出现安全漏洞，因此启用它时要小心。</p><p>最后一点：如果你关闭浏览器，下次要启用 Flash 时，你将不得不再次执行此过程。 Chrome 正在积极劝告用户不要启用 Flash，因此他们尽可能地让 Flash 变得烦人。</p> ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ 如何在 Chrome 上恢复标签页——恢复你的上一个会话和页面 ]]>
                </title>
                <description>
                    <![CDATA[ 原文：How to Restore Tabs on Chrome: Restore Your Last Session and Pages [https://www.freecodecamp.org/news/how-to-restore-tabs-in-google-chrome-restore-your-last-session-and-pages/] ，作者：Arthur Puszynski [https://www.freecodecamp.org/news/author/arthur/] Chrome 已成为世界上最受欢迎的网络浏览器，其性能和功能优于其竞争对手。但是这种流行度的上升导致许多人在丢失或关闭 Chrome 标签页的情况下丢失重要的网页、搜索和会话。 想象一下，你正在为一个项目做研究，在点击了大量的链接之后，到达了完美的信息来源。你不知道你是如何到达那里的，但你现在就在那里，这就足够了。 你在做笔记、发邮件、切换标签，一切都很顺利......直到灾难降临：你不小心点击了错误的像素，你需要的标签页毫无征兆地消失了? 或者，不是你自己的错，Chrome 浏览器 ]]>
                </description>
                <link>https://www.freecodecamp.org/chinese/news/how-to-restore-tabs-in-google-chrome-restore-your-last-session-and-pages/</link>
                <guid isPermaLink="false">61e68f656161280665ed82d6</guid>
                
                    <category>
                        <![CDATA[ Chrome ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Chengjun.L ]]>
                </dc:creator>
                <pubDate>Wed, 13 Apr 2022 02:20:00 +0000</pubDate>
                <media:content url="https://chinese.freecodecamp.org/news/content/images/2022/04/google-76522_960_720.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>原文：<a href="https://www.freecodecamp.org/news/how-to-restore-tabs-in-google-chrome-restore-your-last-session-and-pages/">How to Restore Tabs on Chrome: Restore Your Last Session and Pages</a>，作者：<a href="https://www.freecodecamp.org/news/author/arthur/">Arthur Puszynski</a></p><p>Chrome 已成为世界上最受欢迎的网络浏览器，其性能和功能优于其竞争对手。但是这种流行度的上升导致许多人在丢失或关闭 Chrome 标签页的情况下丢失重要的网页、搜索和会话。</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2022/04/image-3.png" class="kg-image" alt="image-3" width="600" height="400" loading="lazy"></figure><p>想象一下，你正在为一个项目做研究，在点击了大量的链接之后，到达了完美的信息来源。你不知道你是如何到达那里的，但你现在就在那里，这就足够了。</p><p>你在做笔记、发邮件、切换标签，一切都很顺利......直到灾难降临：你不小心点击了错误的像素，你需要的标签页毫无征兆地消失了?</p><p>或者，不是你自己的错，Chrome 浏览器决定无缘无故地让你崩溃。</p><p>不必担心，你不是第一个发生这种情况的人，你也不会是最后一个。幸运的是，谷歌浏览器会记住你的网页浏览历史，无论出了什么问题，你都应该能够完全恢复。</p><p>如果你遇到这种情况，这里有几种方法可以轻松恢复 Chrome 浏览器中关闭的标签页。</p><h2 id="-">意外关闭标签页</h2><p>如果你只是单击了错误的像素并关闭了你无意关闭的标签页，则很容易恢复。你只需右键单击标签页栏部分中的空白区域，然后选择重新打开已关闭的标签页。</p><figure class="kg-card kg-image-card"><img src="https://www.freecodecamp.org/news/content/images/2020/03/image-20.png" class="kg-image" alt="image-20" width="600" height="400" loading="lazy"></figure><p>你也可以使用键盘快捷键——按下 Ctrl+Shift+T（或 Mac 上的 Command+Shift+T），你关闭的最后一个标签页将在新标签页中重新打开。</p><h2 id="--1">浏览器或电脑崩溃了</h2><p>电脑崩溃从来不是一个令人愉快的经历，但你不必担心 Chrome 浏览器会丢失你当前的会话。</p><p>当你失去所有打开的标签页时，谷歌浏览器可以优雅地处理崩溃。通常当你重启 Chrome 时，它会显示一个“恢复标签页”按钮。这个选项将完全恢复你最后的浏览会话。点击它，你就会回到你离开的地方。</p><p>如果你没有看到这个选项，也没关系。点击 Chrome 菜单，将你的光标悬停在历史菜单项上。在那里你应该看到一个选项，上面写着“#标签”，例如“12个标签页”。你可以点击这个选项来恢复你之前的会话。</p><figure class="kg-card kg-image-card"><img src="https://www.freecodecamp.org/news/content/images/2020/03/image-19.png" class="kg-image" alt="image-19" width="600" height="400" loading="lazy"></figure><p>Ctrl+Shift+T 命令也可以重新打开崩溃的或关闭的 Chrome 窗口。你可以一直按这个快捷键，直到它完全恢复关闭的标签页和窗口。</p><h2 id="--2">恢复最近关闭的标签页</h2><p>同样，你可以通过再次点击 Chrome 菜单，将光标悬停在历史菜单项上，来恢复最近关闭的标签页。那里也会列出你最近访问的页面的简短摘要。</p><p>如果你想恢复的页面被列在那里，你可以点击恢复它。如果它不在那里，你可以尝试下一个方法。</p><h2 id="--3">你前几天关闭的标签页</h2><p>如果你还没有看到你想恢复的网页，点击历史记录子菜单项（Chrome 菜单&gt;历史记录&gt;历史记录）。或者你可以使用快捷键 Ctrl+H（Mac：Command+Y）。</p><figure class="kg-card kg-image-card"><img src="https://www.freecodecamp.org/news/content/images/2020/03/image-21.png" class="kg-image" alt="image-21" width="600" height="400" loading="lazy"></figure><p>这将显示你访问的全部历史页面。你应该能在那里找到你想要的页面。你甚至可以搜索你的网页历史记录，以方便你在关闭或丢失标签页后的一段时间内找回它们。</p><p><strong>小心</strong>——如果你在无痕模式下浏览，丢失了你的标签页面，Chrome 将不会记住它们。</p><h2 id="--4">提示</h2><p>通过点击地址栏右侧的 ⭐️ 图标，将你经常访问的网页加入书签。这将在 Chrome 浏览器中添加一个按钮——点击这个按钮将把当前标签重定向到这个网页。</p> ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Chrome 开发者工具有哪些前端实用功能 ]]>
                </title>
                <description>
                    <![CDATA[ Chrome 开发者工具是谷歌浏览器 Chrome 内置的一套 Web 开发和调试工具，可用于对网站进行迭代、调试和分析。 可通过三种方式打开 Chrome 开发者工具：  * 在 Chrome 菜单中选择更多工具 > 开发者工具  * 在页面元素上右键点击，选择 “检查”  * 使用快捷键 Ctrl+Shift+I（Windows）或 Cmd+Opt+I（Mac） 本文将总结介绍 Chrome 开发者工具的一些前端实用功能。 1. 查看元素伪类 css 样式 例如我想查看元素触发 hover 时的 css 样式。先选中该元素，然后按下图操作： 2. 临时增删元素 class 3. document.body.contentEditable="true" 在控制台输入 document.body.contentEditable="true"，就可以对页面直接进行编辑。 4. 查看 placeholder 样式 现在可以查看元素的 placeholder ]]>
                </description>
                <link>https://www.freecodecamp.org/chinese/news/front-end-functions-of-chrome-dev-tool/</link>
                <guid isPermaLink="false">5fb5e80139641a0517d50f66</guid>
                
                    <category>
                        <![CDATA[ Chrome ]]>
                    </category>
                
                    <category>
                        <![CDATA[ 谷歌 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ 前端开发 ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ woai3c ]]>
                </dc:creator>
                <pubDate>Mon, 02 Aug 2021 10:32:00 +0000</pubDate>
                <media:content url="https://chinese.freecodecamp.org/news/content/images/2020/11/aditya-chinchure--39OrtuhSTc-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Chrome 开发者工具是谷歌浏览器 Chrome 内置的一套 Web 开发和调试工具，可用于对网站进行迭代、调试和分析。</p><p>可通过三种方式打开 Chrome 开发者工具：</p><ul><li>在 Chrome 菜单中选择<strong><strong>更多工具</strong></strong> &gt; <strong><strong>开发者工具</strong></strong></li><li>在页面元素上右键点击，选择 “检查”</li><li>使用快捷键 Ctrl+Shift+I（Windows）或 Cmd+Opt+I（Mac）</li></ul><p>本文将总结介绍 Chrome 开发者工具的一些前端实用功能。</p><h3 id="1-css-">1. 查看元素伪类 css 样式</h3><p>例如我想查看元素触发 <code>hover</code> 时的 css 样式。先选中该元素，然后按下图操作：</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-29.png" class="kg-image" alt="image-29" width="600" height="400" loading="lazy"></figure><h3 id="2-class">2. 临时增删元素 class</h3><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/1.gif" class="kg-image" alt="1" width="600" height="400" loading="lazy"></figure><h3 id="3-document-body-contenteditable-true">3. <code>document.body.contentEditable="true"</code></h3><p>在控制台输入 <code>document.body.contentEditable="true"</code>，就可以对页面直接进行编辑。</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/2.gif" class="kg-image" alt="2" width="600" height="400" loading="lazy"></figure><h3 id="4-placeholder-">4. 查看 placeholder 样式</h3><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-31.png" class="kg-image" alt="image-31" width="600" height="400" loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-33.png" class="kg-image" alt="image-33" width="600" height="400" loading="lazy"></figure><p>现在可以查看元素的 placeholder 样式了：</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-34.png" class="kg-image" alt="image-34" width="600" height="400" loading="lazy"></figure><h3 id="5-seo">5. 测试页面性能和 SEO</h3><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-35.png" class="kg-image" alt="image-35" width="600" height="400" loading="lazy"></figure><p>下面是测试报告：</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-36.png" class="kg-image" alt="image-36" width="600" height="400" loading="lazy"></figure><p>参考资料：</p><ul><li><a href="https://developers.google.com/web/tools/lighthouse" rel="nofollow noreferrer">使用 Lighthouse 审查网络应用</a></li></ul><h3 id="6-network-">6. Network 显示资源的其他信息</h3><p>一般 Network 会显示加载资源的详细信息，但它默认只显示部分信息。如果我想查询网页资源是通过 HTTP1.1 还是 HTTP2 加载的，要怎么做呢？</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/3.gif" class="kg-image" alt="3" width="600" height="400" loading="lazy"></figure><p>从 GIF 中可以看出，除了 HTTP 协议版本外，还可以查看其他信息，例如 HTTP 请求的方法、域名等等。</p><h3 id="7-">7. 查看元素绑定事件</h3><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-37.png" class="kg-image" alt="image-37" width="600" height="400" loading="lazy"></figure><p>鼠标移到 <code>handler</code> 上，可查看具体的函数代码。</p><h3 id="8-">8. 全局搜索代码</h3><p>打开开发者工具，点击 <code>Console</code> 标签，按 ESC 弹出，点击左边竖形排列的三个小点，选择 <code>Search</code>：</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-38.png" class="kg-image" alt="image-38" width="600" height="400" loading="lazy"></figure><p>点击搜索结果，会跳到具体的源码文件。它会搜索该网页下所有引入的文件。</p><h3 id="9-performance-">9. 利用 Performance 检查运行时性能</h3><p>打开开发者工具，点击 <code>Performance</code> 标签：</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-39.png" class="kg-image" alt="image-39" width="600" height="400" loading="lazy"></figure><p>点击左上角的 <code>Record</code> 按钮开始记录，然后你模拟正常用户使用网页。测试完毕后，点击 <code>Stop</code>。</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-40.png" class="kg-image" alt="image-40" width="600" height="400" loading="lazy"></figure><p>可以看到右上角分别有 FPS、CPU、NET、HEAP：</p><ol><li>FPS 对应的是帧率，红色代表帧率低，可能会降低用户体验；绿色代表帧率正常，绿色条越高，FPS 越高。</li><li>CPU 部分上有黄色、紫色等色块，它们的释义请看图的左下角。谁的占比高，说明 CPU 主要的时间花在哪里。</li><li>HEAP 就是堆内存占用。</li></ol><p>NET 最好点击下面的 Network 查看，可以看到具体的加载资源等。</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-41.png" class="kg-image" alt="image-41" width="600" height="400" loading="lazy"></figure><p>一般根据这些信息就能判断出网页性能问题出在哪。</p><p>如果想了解更多，请查看下面的参考资料，需要翻 qiang。或者用搜索引擎搜索 chrome performance，也有很多讲解使用方法的文章。</p><p>参考资料</p><ul><li><a href="https://developers.google.com/web/tools/chrome-devtools/evaluate-performance" rel="nofollow noreferrer">Get Started With Analyzing Runtime Performance</a></li></ul><h3 id="10-rendering-">10. Rendering 实时检测网页变化</h3><p>打开开发者工具，点击 <code>Console</code> 标签，按 ESC 弹出：</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-43.png" class="kg-image" alt="image-43" width="600" height="400" loading="lazy"></figure><p>点击左边竖形排列的三个小点，选择 <code>Rendering</code>：</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-42.png" class="kg-image" alt="image-42" width="600" height="400" loading="lazy"></figure><p>下面是比较实用的功能：</p><ol><li>Paint flashing，实时高亮重绘区域（绿色）。</li><li>Layout Shift Regions，实时高亮重排（重新布局）区域（蓝色）。</li><li>Layer borders，将合成层用边框标出来（橙色、橄榄色、青色）。</li><li>Frame Rendering Stats，显示 GPU 的信息，旧版本还有实时 FPS 显示，但新版本不知道为何没有（chrome 86）。</li></ol><h3 id="11-application-">11. Application 查看应用信息</h3><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-44.png" class="kg-image" alt="image-44" width="600" height="400" loading="lazy"></figure><p>从图中看到，在 <code>Application</code> 标签下可以查到本页面很多信息。拿 <code>localStorage</code> 举例，现在我执行代码 <code>localStorage.setItem('token', '123')</code>，然后打开 <code>Application</code>：</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/11/image-45.png" class="kg-image" alt="image-45" width="600" height="400" loading="lazy"></figure><p>不出意外，能看到新增的 <code>localStorage</code> 信息。</p> ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ 你知道 Chrome 自带的开发者工具有这些功能吗 ]]>
                </title>
                <description>
                    <![CDATA[ Chrome 自带开发者工具。它的功能十分丰富，包括元素、网络、安全等等。今天我们主要介绍 JavaScript 控制台部分的功能。 我最早写代码的时候，也就是在 JS 控制台里输出一些服务器返回的内容，或者一些变量的值。但是后来通过一些深入的学习和了解，我发现 Chrome 的 JS 控制台原来还有这么多神奇的功能。 在这里我总结了一些特别有用的功能。要是你凑巧在 Chrome 里浏览这篇文章的话，现在就打开开发者工具，跟着随手试试吧！ 1. 选取 DOM 元素 要是你用过两天 jQuery 的话，一定对 $('.className') 或者 $('#id') 这种选择器不会陌生。上面这俩货分别是 jQuery 的类选择器和 ID 选择器。 在一个网页没有引入 jQuery 的情况下，在控制台里你也可以通过类似的方法选取 DOM。 不管 $('tagName') /$('.class')/ $('#id') 还是 $('.class #id') 等类似的选择器，都相当于原生JS的document.querySelector('') 方法。这个方法返回第一个匹配选择规则的DO ]]>
                </description>
                <link>https://www.freecodecamp.org/chinese/news/how-much-do-you-know-about-chrome-developer-tools/</link>
                <guid isPermaLink="false">5d3a9718fbfdee429dc5f369</guid>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Chrome ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ 余博伦 ]]>
                </dc:creator>
                <pubDate>Thu, 17 Jun 2021 09:00:00 +0000</pubDate>
                <media:content url="https://chinese.freecodecamp.org/news/content/images/2019/07/1_WWyilxdduXEkWudAJaqKsA.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p><strong>Chrome </strong>自带开发者工具。它的功能十分丰富，包括元素、网络、安全等等。今天我们主要介绍 <strong>JavaScript 控制台</strong>部分的功能。</p><p>我最早写代码的时候，也就是在 JS 控制台里输出一些服务器返回的内容，或者一些变量的值。但是后来通过一些深入的学习和了解，我发现 Chrome 的 JS 控制台原来还有这么多神奇的功能。</p><p>在这里我总结了一些特别有用的功能。要是你凑巧在 Chrome 里浏览这篇文章的话，现在就打开开发者工具，跟着随手试试吧！</p><h3 id="1-dom-">1. 选取 DOM 元素</h3><p>要是你用过两天 jQuery 的话，一定对 $('.className') 或者 $('#id') 这种选择器不会陌生。上面这俩货分别是 jQuery 的类选择器和 ID 选择器。</p><p>在一个网页没有引入 jQuery 的情况下，在控制台里你也可以通过类似的方法选取 DOM。</p><p>不管 $('tagName') /$('.class')/ $('#id') 还是 $('.class #id') 等类似的选择器，都相当于原生JS的document.querySelector('') 方法。这个方法返回第一个匹配选择规则的DOM元素。</p><p>在 Chrome 的控制台里，你可以通过 $$('tagName') 或者 $$('.className') 记得是两个 $$ 符号来选择所有匹配规则的 DOM 元素。选择返回的结果是一个数组，可以通过数组的方法来访问其中的单个元素。</p><p><br>举个栗子 $$('className') 会返回给你所有包含 className 类属性的元素，之后你可以通过 $$('className')[0] 和$$('className')[1] 来访问其中的某个元素。</p><figure class="kg-card kg-image-card"><img src="https://pic4.zhimg.com/80/v2-0be76f26dc59fc5a2f910a6557376c3b_hd.png" class="kg-image" alt="v2-0be76f26dc59fc5a2f910a6557376c3b_hd" width="600" height="400" loading="lazy"></figure><h3 id="2-chrome-">2. 一秒钟让 Chrome 变成所见即所得的编辑器</h3><p>你可能经常会困惑你到底能不能直接在浏览器里更改网页的文本内容。答案是肯定的，你可以只通过一行简单的指令把 Chrome 变成所见即所得的编辑器，直接在网页上随心所欲地删改文字。</p><p>你不需要再傻傻地右键审查元素，编辑源代码了。打开 Chrome 的开发者控制台，输入：</p><pre><code class="language-js">document.body.contentEditable=true
</code></pre><p>然后奇迹就发生啦！要是你正在用 Chrome 现在就可以试试！</p><figure class="kg-card kg-image-card"><img src="https://pic1.zhimg.com/80/v2-56b77b9da4641560bad6101cd4cd6558_hd.png" class="kg-image" alt="v2-56b77b9da4641560bad6101cd4cd6558_hd" width="600" height="400" loading="lazy"></figure><h3 id="3-dom-">3. 获取某个 DOM 元素绑定的事件</h3><p>在调试的时候，你肯定需要知道某个元素上面绑定了什么触发事件。Chrome 的开发者控制台可以让你很轻松地找到它们。</p><p>getEventListeners($('selector')) 方法以数组对象的格式返回某个元素绑定的所有事件。你可以在控制台里展开对象查看详细的内容。</p><figure class="kg-card kg-image-card"><img src="https://pic2.zhimg.com/80/v2-076155237e53e09b7631913d0e563221_hd.png" class="kg-image" alt="v2-076155237e53e09b7631913d0e563221_hd" width="600" height="400" loading="lazy"></figure><p>要是你需要选择其中的某个事件，可以通过下面的方法来访问：</p><pre><code class="language-js">getEventListeners($('selector')).eventName[0].listener
</code></pre><p>这里的 eventName 表示某种事件类型，例如：</p><pre><code class="language-js">getEventListeners($('#firstName')).click[0].listener
</code></pre><p>上面的例子会返回 ID 为 firstName 元素绑定的 click 事件。</p><h3 id="4-">4. 监测事件</h3><p>当你需要监视某个 DOM 触发的事件时，也可以用到控制台。例如下面这些方法：</p><ul><li>monitorEvents($('selector')) 会监测某个元素上绑定的所有事件，一旦该元素的某个事件被触发就会在控制台里显示出来。</li><li>monitorEvents($('selector'),'eventName') 可以监听某个元素上绑定的具体事件。第二个参数代表事件类型的名称。例如 monitorEvents($('#firstName'),'click') 只监测ID为firstName的元素上的click事件。</li><li>monitorEvents($('selector'),['eventName1','eventName3',….]) 同上。可以同时检测具体指定的多个事件类型。</li><li>unmonitorEvents($('selector')) 用来停止对某个元素的事件监测。</li></ul><h3 id="5-">5. 用计时器来获取某段代码块的运行时间</h3><p>通过 console.time('labelName') 来设定一个计时器，其中的 labelName 是计时器的名称。通过console.timeEnd('labelName') 方法来停止并输出某个计时器的时间。例如：</p><pre><code class="language-js">console.time('myTime'); //设定计时器开始 - myTime
console.timeEnd('mytime'); //结束并输出计时时长 - myTime

//输出: myTime:123.00 ms
</code></pre><p>再举一个通过计时器来计算代码块运行时间的例子：</p><pre><code class="language-js">console.time('myTime'); //开始计时 - myTime

for(var i=0; i &lt; 100000; i++){
  2+4+5;
}

console.timeEnd('mytime'); //结束并输出计时时长 - myTime

//输出 - myTime:12345.00 ms
</code></pre><h3 id="6-">6. 以表格的形式输出数组</h3><p>假设我们有一个像下面这样的数组：</p><pre><code class="language-js">var myArray=[{a:1,b:2,c:3},{a:1,b:2,c:3,d:4},{k:11,f:22},{a:1,b:2,c:3}]
</code></pre><p>要是你直接在控制台里输入数组的名称，Chrome会以文本的形式返回一个数组对象。但你完全可以通过console.table(variableName) 方法来以表格的形式输出每个元素的值。例如下图：</p><figure class="kg-card kg-image-card"><img src="https://pic2.zhimg.com/80/v2-abfd37780b085970c42098f8071afefd_hd.png" class="kg-image" alt="v2-abfd37780b085970c42098f8071afefd_hd" width="600" height="400" loading="lazy"></figure><h3 id="7-">7. 通过控制台方法来检查元素</h3><p>你可以直接在控制台里输入下面的方法来检查元素</p><ul><li>inspect($('selector')) 会检查所有匹配选择器的 DOM 元素，并返回所有选择器选择的 DOM 对象。例如 inspect($('#firstName')) 选择所有 ID 是 firstName 的元素，inspect($('a')[3]) 检查并返回页面上第四个 p元素。</li><li>$0, $1, $2 等等会返回你最近检查过的几个元素，例如 $0 会返回你最后检查的元素，$1 则返回倒数第二个。</li></ul><figure class="kg-card kg-image-card"><img src="https://pic1.zhimg.com/80/v2-e90e6e4af6d558254f013e1e44be7df0_hd.png" class="kg-image" alt="v2-e90e6e4af6d558254f013e1e44be7df0_hd" width="600" height="400" loading="lazy"></figure><h3 id="8-">8. 列出某个元素的所有属性</h3><p>你也可以通过控制台列出某个元素的所有属性：</p><p>dir($('selector')) 会返回匹配选择器的 DOM 元素的所有属性，你可以展开输出的结果查看详细内容。</p><figure class="kg-card kg-image-card"><img src="https://pic3.zhimg.com/80/v2-55921f16427b171b529693b3bbbc2342_hd.png" class="kg-image" alt="v2-55921f16427b171b529693b3bbbc2342_hd" width="600" height="400" loading="lazy"></figure><h3 id="9-">9. 获取最后计算结果的值</h3><p>你可以把控制台当作计算器使用。当你在 Chrome 控制台里进行计算时，可以通过 $_来获取最后的计算结果值，还是直接看例子吧：</p><pre><code class="language-js">2+3+4
9 //- The Answer of the SUM is 9

$_
9 // Gives the last Result

$_ * $_
81  // As the last Result was 9

Math.sqrt($_)
9 // As the last Result was 81

$_
9 // As the Last Result is 9
</code></pre><figure class="kg-card kg-image-card"><img src="https://pic2.zhimg.com/80/v2-0f9403c639ff8182c5d1fb4e5775ea5d_hd.png" class="kg-image" alt="v2-0f9403c639ff8182c5d1fb4e5775ea5d_hd" width="600" height="400" loading="lazy"></figure><h3 id="10-">10. 清空控制台输出</h3><p>当你需要这么做的时候，只需要输入 clear() 然后回车就好啦！</p><p><strong>Chrome 开发者工具</strong>的强大远远超出你的想象！这只是其中的一部分小技巧而已，希望能够帮到你！</p><p>感谢您的阅读，要是您有什么自己的独门小技巧，也希望您在评论区与大家分享！</p><p>原文链接：<a href="https://www.freecodecamp.org/news/10-tips-to-maximize-your-javascript-debugging-experience-b69a75859329/#.cj9742xlv">Things you probably didn’t know you could do with Chrome’s Developer Console</a>，作者：Swagat Kumar Swain</p> ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Chrome DevTools：如何过滤网络请求 ]]>
                </title>
                <description>
                    <![CDATA[ 作为前端开发人员，我们常常在浏览器中打开 DevTools（开发者工具）。 DevTools 中的主要部分之一是 network（网络）面板。你可以在 network 面板中执行以下操作：  * 通过文本查找网络请求  * 通过正则表达式查找网络请求  * 过滤（排除）网络请求  * 使用属性过滤器查看特定域的网络请求  * 按资源类型查找网络请求 在本教程中，我使用的是 freeCodeCamp 的主页 freecodecamp.org/news。只需跳转到该页面并打开 network 面板。 你可以在 Mac 上按 cmd + opt + j，或在 Windows 电脑上按 ctrl + shift + j，查看 network  面板。默认情况下，它将在 DevTools 中打开 console（控制台）面板。 按“cmd ]]>
                </description>
                <link>https://www.freecodecamp.org/chinese/news/chrome-devtools-network-tab-tricks/</link>
                <guid isPermaLink="false">609ba595724d3b04e234ee11</guid>
                
                    <category>
                        <![CDATA[ Chrome ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Chengjun.L ]]>
                </dc:creator>
                <pubDate>Wed, 12 May 2021 10:00:00 +0000</pubDate>
                <media:content url="https://chinese.freecodecamp.org/news/content/images/2021/05/5f9c9a87740569d1a4ca2629.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>作为前端开发人员，我们常常在浏览器中打开 DevTools（开发者工具）。</p><p>DevTools 中的主要部分之一是 <code>network</code>（网络）面板。你可以在 <code>network</code> 面板中执行以下操作：</p><ul><li>通过文本查找网络请求</li><li>通过正则表达式查找网络请求</li><li>过滤（排除）网络请求</li><li>使用属性过滤器查看特定域的网络请求</li><li>按资源类型查找网络请求</li></ul><p>在本教程中，我使用的是 freeCodeCamp 的主页 <a href="https://chinese.freecodecamp.org/news/chrome-devtools-network-tab-tricks/freecodecamp.org/news">freecodecamp.org/news</a>。只需跳转到该页面并打开 <code>network</code> 面板。</p><p>你可以在 Mac 上按 <code>cmd + opt + j</code>，或在 Windows 电脑上按 <code>ctrl + shift + j</code>，查看 <code>network</code> 面板。默认情况下，它将在 DevTools 中打开 <code>console</code>（控制台）面板。</p><figure class="kg-card kg-image-card kg-width-wide kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-22.18.37.png" class="kg-image" alt="Screenshot-2020-06-02-at-22.18.37" width="600" height="400" loading="lazy"><figcaption>按“cmd + opt + j” 在 DevTools 中打开控制台面板</figcaption></figure><p>打开 <code>console</code> 面板之后，只需要点击 <code>network</code>，就可以切换到网络面板。</p><figure class="kg-card kg-image-card kg-width-wide kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-22.19.57.png" class="kg-image" alt="Screenshot-2020-06-02-at-22.19.57" width="600" height="400" loading="lazy"><figcaption>点击 “network” 面板，将显示对一个页面进行的所有网络请求</figcaption></figure><p>打开 <code>network</code> 面板了，我们的教程可以开始了。</p><h2 id="-"><strong><strong>开始吧</strong></strong></h2><p>确保打开了正确的页面（<a href="https://chinese.freecodecamp.org/news/chrome-devtools-network-tab-tricks/freecodecamp.org/news">freecodecamp.org/news</a>），并且在 DevTools 中打开了 <code>network</code> 面板：</p><figure class="kg-card kg-image-card kg-width-wide kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-23.12.01.png" class="kg-image" alt="Screenshot-2020-06-02-at-23.12.01" width="600" height="400" loading="lazy"><figcaption>filter 栏在网络面板中的位置</figcaption></figure><ul><li>绿色框中的图标是可以隐藏/显示网络面板中的 filter（过滤器）区域的图标。</li><li>红色框显示 filter 区域。我们勾选这个区域的框，可以过滤出网络请求。</li></ul><h3 id="--1">通过文本查找网络请求</h3><p>在过滤器文本框中输入 <code>analytics</code>，只显示包含文本 <code>analytics</code> 的文件。</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-22.47.38.png" class="kg-image" alt="Screenshot-2020-06-02-at-22.47.38" width="600" height="400" loading="lazy"></figure><h3 id="--2">通过正则表达式查找网络请求</h3><p>输入 <code>/.*\min.[c]s+$/</code>，DevTools 会过滤出文件名以 <code>min.c</code> 加上 1 个及以上 <code>s</code> 结尾的资源。</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-23.21.34.png" class="kg-image" alt="Screenshot-2020-06-02-at-23.21.34" width="600" height="400" loading="lazy"></figure><h3 id="--3">过滤（排除）网络请求</h3><p>输入 <code>-min.js</code>，DevTools 会过滤掉包含 <code>-min.js</code> 的所有文件。如果任何其他文件与该模式匹配，它们也将被过滤掉，并且在网络面板中将不可见。</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-22.51.50.png" class="kg-image" alt="Screenshot-2020-06-02-at-22.51.50" width="600" height="400" loading="lazy"></figure><h3 id="--4">使用属性过滤器查看特定域的网络请求</h3><p>在过滤区域输入 <code>domain:code.jquery.com</code>，将只显示 URL 为<code>code.jquery.com</code> 的网络请求。</p><figure class="kg-card kg-image-card kg-width-wide"><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-22.54.22.png" class="kg-image" alt="Screenshot-2020-06-02-at-22.54.22" width="600" height="400" loading="lazy"></figure><h3 id="--5">按资源类型查找网络请求</h3><p>如果你只想查看某个页面上正在使用哪种字体文件，请单击 <code>Font</code>：</p><figure class="kg-card kg-image-card kg-width-wide kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-23.03.41.png" class="kg-image" alt="Screenshot-2020-06-02-at-23.03.41" width="600" height="400" loading="lazy"><figcaption>过滤网络请求，只显示“font”类型文件</figcaption></figure><p>或者，如果你只想查看特定页面上正在加载的 web socket 文件，请单击 <code>WS</code>：</p><figure class="kg-card kg-image-card kg-width-wide kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-23.05.55.png" class="kg-image" alt="Screenshot-2020-06-02-at-23.05.55" width="600" height="400" loading="lazy"><figcaption>过滤网络请求，只显示 “web socket” 类型文件</figcaption></figure><p>你还可以更进一步，同时查看 <code>Font</code> 和 <code>WS</code> 文件。只需先单击 <code>Font</code>，然后按住 <code>cmd</code>单击 <code>WS</code>，打开多个面板。（如果你在 Windows 电脑上，则可以通过使用 <code>ctrl</code> 来进行多选）。</p><figure class="kg-card kg-image-card kg-width-wide kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2020/06/Screenshot-2020-06-02-at-23.08.48.png" class="kg-image" alt="Screenshot-2020-06-02-at-23.08.48" width="600" height="400" loading="lazy"><figcaption>按 “cmd” 键，打开多个面板</figcaption></figure><p>谢谢你阅读这篇教程。如果你觉得它有用，可以分享给你的同事。欢迎你在 <strong><strong><a href="https://twitter.com/adeelibr">twitter.com/adeelibr</a></strong> </strong>联系我。</p><p>原文：<a href="https://www.freecodecamp.org/news/chrome-devtools-network-tab-tricks/">Chrome DevTools: How to Filter Network Requests</a>，作者：<a href="https://www.freecodecamp.org/news/author/adeel/">Adeel Imran</a></p> ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ 有趣的 Chrome 彩蛋：谷歌小恐龙游戏 ]]>
                </title>
                <description>
                    <![CDATA[ 几年前，Google 给 Chrome 浏览器加了一个有趣的彩蛋：如果你在未联网的情况下访问网页，会看到 “Unable to connect to the Internet” 或 “No internet” 的提示，旁边是一只像素恐龙。 小恐龙提示“没有网络”许多人可能觉得这只恐龙只是一个可爱的小图标，在断网的时候陪伴用户。但是后来有人按下空格键，小恐龙开始奔跑！ 这个小彩蛋成为深受人们喜爱的小游戏，风靡至今。 有的人就问了：如果我的设备是在联网的，我想在休息的时候玩，怎么做呢？ 这篇文章会介绍怎么在联网和断网状态下玩谷歌小恐龙游戏。小心，会上瘾哦^_^ 断网时怎么玩 在未联网状态下直接打开 Chrome，在地址栏任意输入一个网址，你就会看到前面说的小恐龙啦。 只需按一下空格键（或者向上键），小恐龙就跑起来了。沿途遇到障碍（比如仙人掌🌵）的时候，按一下向上键，帮助小恐龙跨越障碍。持续按住向上键的时间越长，小恐龙就跳得越高。 准备好跨越仙人掌啦！ 坚持玩的时间越长，小恐龙就跑得越快。如果小恐龙撞上障碍，游戏就结束啦。你需要开启下一轮游戏（分数也会重置）。按一下空格键，就 ]]>
                </description>
                <link>https://www.freecodecamp.org/chinese/news/do-you-know-the-chrome-dino-game-millions-of-people-are-playing/</link>
                <guid isPermaLink="false">5e70721fca1efa04e196bccd</guid>
                
                    <category>
                        <![CDATA[ Chrome ]]>
                    </category>
                
                    <category>
                        <![CDATA[ 谷歌 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ 小恐龙 ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Miya Liu ]]>
                </dc:creator>
                <pubDate>Wed, 18 Mar 2020 09:23:24 +0000</pubDate>
                <media:content url="https://chinese.freecodecamp.org/news/content/images/2020/03/image-27-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>几年前，Google 给 Chrome 浏览器加了一个有趣的彩蛋：如果你在未联网的情况下访问网页，会看到 “Unable to connect to the Internet” 或 “No internet” 的提示，旁边是一只像素恐龙。</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2020/01/image-26.png" class="kg-image" alt="image-26" width="600" height="400" loading="lazy"><figcaption>小恐龙提示“没有网络”</figcaption></figure><p>许多人可能觉得这只恐龙只是一个可爱的小图标，在断网的时候陪伴用户。但是后来有人按下空格键，小恐龙开始奔跑！</p><p>这个小彩蛋成为深受人们喜爱的小游戏，风靡至今。</p><p>有的人就问了：如果我的设备是在联网的，我想在休息的时候玩，怎么做呢？</p><p>这篇文章会介绍怎么在联网和断网状态下玩谷歌小恐龙游戏。小心，会上瘾哦^_^</p><h2 id="-">断网时怎么玩</h2><p>在未联网状态下直接打开 Chrome，在地址栏任意输入一个网址，你就会看到前面说的小恐龙啦。</p><p>只需按一下空格键（或者向上键），小恐龙就跑起来了。沿途遇到障碍（比如仙人掌🌵）的时候，按一下向上键，帮助小恐龙跨越障碍。持续按住向上键的时间越长，小恐龙就跳得越高。</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2020/01/image-27.png" class="kg-image" alt="image-27" width="600" height="400" loading="lazy"><figcaption>准备好跨越仙人掌啦！</figcaption></figure><p>坚持玩的时间越长，小恐龙就跑得越快。如果小恐龙撞上障碍，游戏就结束啦。你需要开启下一轮游戏（分数也会重置）。按一下空格键，就可以重新开始游戏。</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2020/01/image-28.png" class="kg-image" alt="image-28" width="600" height="400" loading="lazy"><figcaption>注意不要跳进仙人掌丛！</figcaption></figure><h2 id="--1"><strong>联网时怎么玩</strong></h2><p>在等待网络恢复的片刻有小恐龙陪你娱乐，是不是感觉不错？联网之后怎么继续玩这个游戏呢？请看下方攻略。</p><h3 id="-url">访问 URL</h3><p>最简单的方式就是访问这个地址： <a href="chrome://dino/">chrome://dino/</a>。看，小恐龙又出现了。</p><figure class="kg-card kg-image-card"><img src="https://www.freecodecamp.org/news/content/images/2020/01/image-29.png" class="kg-image" alt="image-29" width="600" height="400" loading="lazy"></figure><p>这个时候你只需要按空格键，就可以带领小恐龙继续跨越仙人掌了。</p><h3 id="--2">还有一个小技巧</h3><p>如果你的设备断网，页面没有显示前面说的 “No internet” 信息；或者你不想刻意关掉 wifi，那么你可以在设备联网状态下，点击 F12 键打开开发者工具，点击 Network，找到 Online/Offline 标签。</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2020/01/image-30.png" class="kg-image" alt="image-30" width="600" height="400" loading="lazy"><figcaption>看到 online 旁边的下拉箭头了吧</figcaption></figure><p>点击 online 旁边的下拉箭头，再点击 offline（切换成离线状态）。</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2020/01/image-31.png" class="kg-image" alt="image-31" width="600" height="400" loading="lazy"><figcaption>选择 offline</figcaption></figure><p>然后，任意输入一个网址，小恐龙又出现了。接下来，退出开发者工具，按一下空格键，跨越吧，小恐龙！</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.freecodecamp.org/news/content/images/2020/01/image-32.png" class="kg-image" alt="image-32" width="600" height="400" loading="lazy"><figcaption>玩的开心~</figcaption></figure><p>以上就是在断网和联网状态下玩谷歌小恐龙游戏的方法，简单的乐趣^_^ 将手机设置成飞行模式，打开 Chrome，也可以玩。</p><p>最近大家都陆续复工了，好些公司因为要赶项目进度免不了让员工加班。不过，再怎么忙，大家也要注意放松啊，身体健康最重要。在工作间隙玩玩这款不怎么需要动脑筋的小游戏，也是不错的调节方式。</p><p>实际上，这款小游戏的热门程度可能超乎你的想象。世界各地的人们每个月玩这款游戏的次数高达两亿七千万次，大部分人是来自那些网络基础设施还不够普及的国家，比如印度、巴西、墨西哥和印度尼西亚，不管是成年人还是小朋友，都为之着迷！</p><h2 id="--3">灵感来源</h2><p>这只可爱的小恐龙是设计师 Sebastien Gabriel 的作品。他在一次访谈中说，他觉得没有 wifi 的年代就像是史前时代，很多人都已经忘记那个只能在公司、学校或者网吧才能上网的年代，所以他就以史前时代的代表——恐龙，作为断网的图标。</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/image-53.png" class="kg-image" alt="image-53" width="515" height="542" loading="lazy"><figcaption>小恐龙周边</figcaption></figure><p>一开始它只是一个单纯的小图标，一直到 2014 年 9 月，这个小游戏才正式上线。游戏设计师 Edward Jung 是第一次设计游戏，所以刚上线的时候，这款游戏难以在较旧的 Android 设备上运行，因此他们全部重写，并于当年 12 月大功告成。</p><h2 id="--4">游戏有哪些更新</h2><p>随着时间过去，这款小游戏也在不断更新。</p><p>比如，加入了会飞过去的翼龙：</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/image-41.png" class="kg-image" alt="image-41" width="507" height="209" loading="lazy"></figure><p>还加入了夜晚模式：</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/image-42.png" class="kg-image" alt="image-42" width="505" height="189" loading="lazy"></figure><p>在 Chrome 浏览器十周年的时候，团队设计了周年纪念版，在游戏中加入了蛋糕，恐龙吃过蛋糕之后，头上会出现派对帽，很可爱！</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/--.gif" class="kg-image" alt="--" width="325" height="129" loading="lazy"></figure><h2 id="--5">游戏有没有尽头</h2><p>设计师 Edward Jung 说，只要你坚持玩 1700 万年，游戏就会结束了。1700 万年正是暴龙在地球上存在的总的时间。</p><p>所以，游戏的尽头有没有什么大彩蛋，恐怕只有设计师本人才知道了。</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/image-52.png" class="kg-image" alt="image-52" width="1062" height="674" loading="lazy"></figure><h2 id="--6">你能玩到多少分</h2><p>目前并没有做一个分数排行榜，所以大家也不知道全世界谁的分数最高。</p><p>不过，谷歌搜索显示最高分是 99,999 分。</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/image-49.png" class="kg-image" alt="image-49" width="775" height="371" loading="lazy"></figure><p>如果你拿到 99,999 分，恭喜你，通关 Level 1，解锁 Level 2！</p><figure class="kg-card kg-image-card"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/-----1-.gif" class="kg-image" alt="-----1-" width="325" height="113" loading="lazy"></figure><p>各国网友在 社交平台上分享自己的分数和攻略。</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/image-56.png" class="kg-image" alt="image-56" width="805" height="320" loading="lazy"><figcaption>所以得高分的前提是：一、没有 wifi，二、有女朋友？</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/image-58.png" class="kg-image" alt="image-58" width="638" height="510" loading="lazy"><figcaption>希望每个变成大人的孩子都记得曾经的梦想啊</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/image-54.png" class="kg-image" alt="image-54" width="655" height="256" loading="lazy"><figcaption>适当的休息是为了更好地再出发哈哈哈</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/image-55.png" class="kg-image" alt="image-55" width="624" height="201" loading="lazy"><figcaption>谷歌很聪明</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/image-57.png" class="kg-image" alt="image-57" width="643" height="131" loading="lazy"><figcaption>锁屏的时候小恐龙会自己跳？</figcaption></figure><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://chinese.freecodecamp.org/news/content/images/2020/03/image-59.png" class="kg-image" alt="image-59" width="605" height="481" loading="lazy"><figcaption>Really?</figcaption></figure><p>当然，可能还有一些机（shua）智（fen）的操作，好奇的朋友可以自己试试看。还有一些方法介绍如何将小恐龙图标改成自己喜欢的形象，这里就不一一介绍啦，大家可以在网络上搜索。</p><p>（附上<a href="https://codepen.io/MysticReborn/pen/rygqao?__cf_chl_jschl_tk__=167e8701019612e8db8c4cf59bf9d667409c31c9-1584525127-0-ATJLffYfDrbI94zAYfjtew7YPLoZoyIzKTN78_qrQKTO3K4RK_bY44CRHvk-bBKDtmPbLxebx1gWhoT1gJZUlh6HZ9nI2C-7n1WAiqAx1JjE3TjBH8q328G8ff0loJgONI4V7VmlEIR9imCygNI6Ru47XTBMVx4ksgLaAWu0IPUOBIJ7JaspZW56nCGRQwNFbX-auz4DgToLm_6snnmwHoHB9k_iVRcFsUG4DzG3fejnKxzduQPkFkg8m2w4sDDieqeAKxYaKz89e7WjTeYVCwKwFDC82M8DsYIrp2J2y9vf6S13rlFlqRfhKG8I35PCy9QkArZPubZl8LOKbzJZ0EOHyvQVQKNmj_QgWRSksopo">代码</a>，供大家参考。）</p><p>参考：</p><ul><li><a href="https://www.freecodecamp.org/news/how-to-play-the-no-internet-google-chrome-dinosaur-game-both-online-and-offline/">https://www.freecodecamp.org/news/how-to-play-the-no-internet-google-chrome-dinosaur-game-both-online-and-offline/</a></li><li><a href="https://www.nerdiest.org/5-things-you-didnt-know-about-the-google-chrome-t-rex-game/">https://www.nerdiest.org/5-things-you-didnt-know-about-the-google-chrome-t-rex-game/</a></li><li><a href="https://zhuanlan.zhihu.com/p/64184738">https://zhuanlan.zhihu.com/p/64184738</a></li></ul> ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
