Add all Lagrange's supported protocols

This commit is contained in:
Erick Ruiz de Chavez 2024-12-24 06:45:07 -05:00 committed by Erick Ruiz de Chavez
parent 7da0360ce5
commit 30fad7c923

View file

@ -1,18 +1,24 @@
// ==UserScript== // ==UserScript==
// @name Linkify Gemini Protocol // @name Small Web Protocols
// @version 1.0.0 // @version 1.0.1
// @description Linkyfy any gemini:// links found on the site. // @description Linkify all links found on the site using supported protocols by Lagrange browser.
// @author Erick Ruiz de Chavez <erick@fastmail.net> // @author Erick Ruiz de Chavez <erick@fastmail.net>
// @include * // @include *
// @grant none // @grant none
// @require https://cdn.jsdelivr.net/npm/linkifyjs@4.2.0/dist/linkify.min.js // @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 // @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== // ==/UserScript==
(function() { (function() {
// Lagrange's supported protocols
linkify.registerCustomProtocol("gemini"); linkify.registerCustomProtocol("gemini");
const options = { linkify.registerCustomProtocol("gopher");
/* … */ linkify.registerCustomProtocol("finger");
}; linkify.registerCustomProtocol("guppy");
linkify.registerCustomProtocol("misfin");
linkify.registerCustomProtocol("titan");
linkifyElement(document.body, {}, document); linkifyElement(document.body, {}, document);
})(); })();