您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Unlock any paid article from Medium by using Freedium, only if the referer is not Freedium
当前为
// ==UserScript== // @name [WORKING] Unlock any Medium Article // @namespace https://github.com/insign // @version 202409271707 // @description Unlock any paid article from Medium by using Freedium, only if the referer is not Freedium // @author Hélio <[email protected]> // @match https://medium.com/* // @grant none // @license WTFPL // ==/UserScript== (function() { 'use strict'; // Obtém a URL atual var currentURL = window.location.href; // Obtém o referenciador (a página anterior que o usuário veio) var referrer = document.referrer; var shouldRedirect = true; if (referrer) { try { // Analisa a URL do referenciador para obter o hostname var referrerHost = (new URL(referrer)).hostname; // Verifica se o referenciador é freedium.cfd if (referrerHost === 'freedium.cfd') { shouldRedirect = false; // Não redireciona se veio do Freedium } } catch (e) { // Se não for possível analisar o referenciador, continua com o redirecionamento console.error('Erro ao analisar o referenciador:', e); } } if (shouldRedirect) { // Cria a nova URL redirecionada var freediumURL = 'https://freedium.cfd/' + currentURL; // Redireciona para a nova URL window.location.replace(freediumURL); } })();