Greasy Fork is available in English.

Freedium Redirect

Redirects Medium Links to Freedium

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
// ==UserScript==
// @name         Freedium Redirect
// @namespace    freedium:redirect
// @version      0.1
// @description  Redirects Medium Links to Freedium
// @author       nekeal
// @match        https://*/*
// @grant        none
// @license      mit
// ==/UserScript==

(function() {
    'use strict';

    window.onload = function() {
        // Check if the page is a Medium article
        const isMediumArticle = (
            document.querySelector('meta[property="og:site_name"]')?.content === 'Medium' &&
            document.querySelector('meta[property="og:type"]')?.content === 'article'
        );

        // Redirect to Freedium if conditions are met
        if (isMediumArticle) {
            document.location = "https://freedium.cfd/" + document.location.href;
        }
    };
})();