Skip to content

Instantly share code, notes, and snippets.

@edvinasbartkus
Last active October 15, 2023 13:18
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save edvinasbartkus/5ca1ce66199d26fa671453cd286f84aa to your computer and use it in GitHub Desktop.
Save edvinasbartkus/5ca1ce66199d26fa671453cd286f84aa to your computer and use it in GitHub Desktop.
bypass paywall for sites like ft.com. Important: IT WILL REMOVE COOKIES (you will be logged out) AND WILL REMOVE LOCATION/SESSION STORAGE
javascript:localStorage.clear();sessionStorage.clear();(function(){var cookies=document.cookie.split("; ");for(var c=0;c<cookies.length;c+=1){var d=window.location.hostname.split(".");while(d.length>0){var cookieBase=encodeURIComponent(cookies[c].split(";")[0].split("=")[0])+'=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain='+d.join('.')+' ;path=';var p=location.pathname.split('/');document.cookie=cookieBase+'/';while(p.length>0){document.cookie=cookieBase+p.join('/');p.pop()};d.shift()}}})();window.location="https://facebook.com/l.php?u="+encodeURIComponent(window.location.href)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment