Modifying a constant value to bypass paywall using Tampermonkey

Skip to first unread message

Earldridge Jazzed Pineda

Aug 11, 2022, 1:35:04 AMAug 11
to greasemonkey-users

I want to modify this constant value from a JavaScript file from using a Tampermonkey script:

const isUpgradeRequired = isMeReady && paidCourse && !isQa && !isOnTrial && !isSubscribed && !payFrom;

I want to make a userscript that attempts to bypass the paywall by setting isUpgradeRequired to false:

const isUpgradeRequired = false;

I tried to use this script, but the paywall is not removed:

var bypass = "const isUpgradeRequired = false;" var code = document.createElement('script'); code.appendChild(document.createTextNode(bypass)); (document.head || document.body || document.documentElement).appendChild(code);

I typed in "isUpgradeRequired" into the console, and it returned false. What went wrong in my userscript?

Reply all
Reply to author
0 new messages