-
-
Save lucky-verma/6cf7fc201ee625d867300e65654180fa to your computer and use it in GitHub Desktop.
Revisions
-
mathix420 revised this gist
May 14, 2024 . 1 changed file with 4 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ // @match *://medium.com/* // @match *://*/* // @grant none // @version 2.4 // @inject-into content // @updateURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @downloadURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js @@ -17,20 +17,19 @@ // initCall is telling us if we need to inject the title observer function mediumRedirecter(initCall = false) { if ( // Allow seeing original articles that were already redirected to freedium. !window.location.href.endsWith('#bypass') && // Do not redirect when editing on medium. !window.location.href.includes("/edit?source=") && // Detect if we are on a medium website (regardless of the domain) document.head?.querySelector('meta[property="al:android:url"]')?.content?.includes('medium://p/') ) { window.location.href = 'https://freedium.cfd/' + window.location.href; } else if (initCall && /(.*\.|^)medium\.com$/.test(window.location.host)) { // Observe <title> changes new MutationObserver(function(mutations) { // If title change is detected, check if a freedium redirect is required if (mutations[0].target.textContent) mediumRedirecter(); }).observe( document.querySelector('title'), -
mathix420 revised this gist
Apr 12, 2024 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ // @match *://medium.com/* // @match *://*/* // @grant none // @version 2.3 // @inject-into content // @updateURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @downloadURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js @@ -18,7 +18,7 @@ // initCall is telling us if we need to inject the title observer function mediumRedirecter(initCall = false) { // I miss typescript... const mediumPostUrlProperty = ((document.head || {}).querySelector ? document.head.querySelector('meta[property="al:android:url"]') : {}) || {} if ( // Allow seeing original articles that were already redirected to freedium. -
mathix420 revised this gist
Apr 11, 2024 . No changes.There are no files selected for viewing
-
mathix420 revised this gist
Apr 11, 2024 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ // @match *://medium.com/* // @match *://*/* // @grant none // @version 2.2 // @inject-into content // @updateURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @downloadURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js @@ -17,7 +17,8 @@ // initCall is telling us if we need to inject the title observer function mediumRedirecter(initCall = false) { // I miss typescript... const mediumPostUrlProperty = ((document.head || {}).querySelector || (() => ({})))('meta[property="al:android:url"]') || {} if ( // Allow seeing original articles that were already redirected to freedium. -
mathix420 revised this gist
Jan 21, 2024 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ // @match *://medium.com/* // @match *://*/* // @grant none // @version 2.1 // @inject-into content // @updateURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @downloadURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js @@ -17,17 +17,15 @@ // initCall is telling us if we need to inject the title observer function mediumRedirecter(initCall = false) { const mediumPostUrlProperty = document.head.querySelector('meta[property="al:android:url"]') || {} if ( // Allow seeing original articles that were already redirected to freedium. !window.location.href.endsWith('#bypass') && // Do not redirect when editing on medium. !window.location.href.includes("/edit?source=") && // Detect if we are on a medium website (regardless of the domain) (mediumPostUrlProperty.content && mediumPostUrlProperty.content.includes('medium://p/')) ) { window.location.href = 'https://freedium.cfd/' + window.location.href; } else if (initCall && /(.*\.|^)medium\.com$/.test(window.location.host)) { -
mathix420 revised this gist
Jan 21, 2024 . 1 changed file with 24 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ // @match *://medium.com/* // @match *://*/* // @grant none // @version 2.0 // @inject-into content // @updateURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @downloadURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js @@ -15,15 +15,29 @@ // @description Don't forget to remove `@match` filters you don't want. // ==/UserScript== // initCall is telling us if we need to inject the title observer function mediumRedirecter(initCall = false) { const mediumPostUrlProperty = document.head.querySelector('meta[property="al:android:url"]') if (!(mediumPostUrlProperty || {}).content) return if ( // Allow seeing original articles that were already redirected to freedium. !window.location.href.endsWith('#bypass') && // Do not redirect when editing on medium. !window.location.href.includes("/edit?source=") && // Detect if we are on a medium website (regardless of the domain) mediumPostUrlProperty.content.includes('medium://p/') ) { window.location.href = 'https://freedium.cfd/' + window.location.href; } else if (initCall && /(.*\.|^)medium\.com$/.test(window.location.host)) { new MutationObserver(function(mutations) { if (mutations[0].target.textContent) mediumRedirecter(); }).observe( document.querySelector('title'), { subtree: true, characterData: true, childList: true } ); } } mediumRedirecter(true); -
mathix420 revised this gist
Jan 1, 2024 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ // @match *://medium.com/* // @match *://*/* // @grant none // @version 1.5 // @inject-into content // @updateURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @downloadURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js @@ -16,8 +16,9 @@ // ==/UserScript== (function () { // 1. Allow seeing original articles that were already redirected to freedium. // 2. Do not redirect when editing on medium. if (window.location.href.endsWith('#bypass') || window.location.href.includes("/edit?source=")) { return; } -
mathix420 revised this gist
Dec 16, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,8 @@ // @match *://medium.com/* // @match *://*/* // @grant none // @version 1.4 // @inject-into content // @updateURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @downloadURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @website https://freedium.cfd -
mathix420 revised this gist
Nov 14, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ // @match *://medium.com/* // @match *://*/* // @grant none // @version 1.3 // @updateURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @downloadURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @website https://freedium.cfd -
mathix420 revised this gist
Nov 14, 2023 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ // ==UserScript== // @name Medium Paywall Bypass // @namespace Violentmonkey Scripts // @run-at document-start // @match *://*.medium.com/* // @match *://medium.com/* // @match *://*/* -
mathix420 revised this gist
Nov 8, 2023 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ // @match *://medium.com/* // @match *://*/* // @grant none // @version 1.2 // @updateURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @downloadURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @website https://freedium.cfd @@ -14,6 +14,11 @@ // ==/UserScript== (function () { // To allow seeing original articles that were already redirected to freedium. if (window.location.href.endsWith('#bypass')) { return; } const mediumPostUrlProperty = document.head.querySelector('meta[property="al:android:url"]') if ((mediumPostUrlProperty || {}).content && mediumPostUrlProperty.content.includes('medium://p/')) { window.location.href = 'https://freedium.cfd/' + window.location.href; -
mathix420 revised this gist
Oct 27, 2023 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,11 @@ // @match *://medium.com/* // @match *://*/* // @grant none // @version 1.1 // @updateURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @downloadURL https://gist.github.com/mathix420/e0604ab0e916622972372711d2829555/raw/medium.user.js // @website https://freedium.cfd // @author Mathix420, ZhymabekRoman // @description Don't forget to remove `@match` filters you don't want. // ==/UserScript== -
mathix420 revised this gist
Oct 19, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,8 @@ // ==/UserScript== (function () { const mediumPostUrlProperty = document.head.querySelector('meta[property="al:android:url"]') if ((mediumPostUrlProperty || {}).content && mediumPostUrlProperty.content.includes('medium://p/')) { window.location.href = 'https://freedium.cfd/' + window.location.href; } })(); -
mathix420 revised this gist
Oct 11, 2023 . No changes.There are no files selected for viewing
-
mathix420 revised this gist
Sep 13, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ // ==/UserScript== (function () { if (document.head.querySelector('meta[property="al:android:url"]').content.includes('medium://p/')) { window.location.href = 'https://freedium.cfd/' + window.location.href; } })(); -
mathix420 revised this gist
Sep 13, 2023 . No changes.There are no files selected for viewing
-
mathix420 created this gist
Sep 13, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ // ==UserScript== // @name Medium Paywall Bypass // @namespace Violentmonkey Scripts // @match *://*.medium.com/* // @match *://medium.com/* // @match *://*/* // @grant none // @version 1.0 // @author Mathix420 // @description Don't forget to remove `@match` filters you don't want. // ==/UserScript== (function () { if (document.head.querySelector('meta[property="al:android:url"]').content.includes('medium://')) { window.location.href = 'https://freedium.cfd/' + window.location.href; } })();