您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
默认不载入面积较大的 <iframe> 元素,减免一部分不必要的资源消耗。不是 lazyload;点击按钮(而不是点击 <iframe> 的任意位置)才会加载,以免误触。
当前为
It's main purpose is to reduce some unnecessary resource consumption caused by s, not block every <iframe> based share buttons (add some social-blocking rulesets into your AdBlocker to block the share buttons) or visualize the existence of every <iframe>s. So expect it to ignore lots of <iframe>s but only seems to suspend the embed YouTube videos.</p> <p>will ignore <iframe>s that:</p> <ul> <li>has <code>srcdoc</code> attribute</li> <li>doesn't have <code>src</code> attribute</li> <li>the value of its <code>src</code> attribute is not a valid URL</li> <li>the URL of its <code>src</code> attribute: <ul> <li>has a origin that is <code>"null"</code>, and/or</li> <li>has a protocol that is not <code>"https:"</code> or <code>"http:"</code></li> <li>(in other words, is <code>"about:blank"</code>, <code>"javascript:*"</code> or <code>"data:*"</code>)</li> </ul></li> <li>narrower than 72px, or generally smaller than 128x128px</li> </ul> <p><strong>Just modify the code to change the behavior.</strong> If you need a lazyload version, but can't code it yourself, I'm glad to say now you can do this by just set <code>loading=lazy</code> attribute to the <code><iframe></code> (<a href="https://web.dev/browser-level-image-lazy-loading/" rel="nofollow">and <code><img></code></a>) elements, for the newest modern browsers:</p> <ul> <li>https://web.dev/iframe-lazy-loading/</li> </ul> <p>And there are some lazyload libs for reference, for older browsers. Here is one of them:</p> <ul> <li>https://github.com/ApoorvSaxena/lozad.js</li> </ul>