Quicklink Loader

Add Quicklink to every webpage to preload links you're likely to click. This can speed up loading times.

Tính đến 01-02-2023. Xem phiên bản mới nhất.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Quicklink Loader
// @match       *://*/*
// @grant       none
// @version     1.0.0
// @author      NoUser
// @description Add Quicklink to every webpage to preload links you're likely to click. This can speed up loading times.
// @run-at      document-start
// @namespace   Quicklink Loader
// @homepage    Quicklink Loader
// @require     https://cdnjs.cloudflare.com/ajax/libs/quicklink/2.3.0/quicklink.umd.js
// @license MIT
// ==/UserScript==

// Test on
// https://mini-ecomm.glitch.me/

quicklink.listen({
// Allows all cross-origin requests, useful for sites that use multiple subdomains
origins: true,
ignores: [
    // Ignore all /api/ urls
    /\/api\/?/,
    // Ignore all api. urls
    /\^api\./,
    // Ignore login/signup urls
    /\/(sign|log)\/?/,
    //
    uri => uri.includes('#'),
    // Ignore all links, scripts which has explicit noprefetch
    (uri, elem) => elem.hasAttribute('noprefetch'),
  ],
});