24 lines
1 KiB
JavaScript
24 lines
1 KiB
JavaScript
// ==UserScript==
|
|
// @name Small Web Protocols
|
|
// @version 1.0.1
|
|
// @description Linkify all links found on the site using supported protocols by Lagrange browser.
|
|
// @author Erick Ruiz de Chavez <erick@fastmail.net>
|
|
// @include *
|
|
// @grant none
|
|
// @require https://cdn.jsdelivr.net/npm/linkifyjs@4.2.0/dist/linkify.min.js
|
|
// @require https://cdn.jsdelivr.net/npm/linkify-element@4.2.0/dist/linkify-element.min.js
|
|
// @updateURL https://code.palmiers.xyz/erick/user-scripts/raw/branch/main/linkify.user.js
|
|
// @downloadURL https://code.palmiers.xyz/erick/user-scripts/raw/branch/main/linkify.user.js
|
|
// ==/UserScript==
|
|
|
|
(function() {
|
|
// Lagrange's supported protocols
|
|
linkify.registerCustomProtocol("gemini");
|
|
linkify.registerCustomProtocol("gopher");
|
|
linkify.registerCustomProtocol("finger");
|
|
linkify.registerCustomProtocol("guppy");
|
|
linkify.registerCustomProtocol("misfin");
|
|
linkify.registerCustomProtocol("titan");
|
|
|
|
linkifyElement(document.body, {}, document);
|
|
})();
|