Le Scienza Paywall Bypass

Unhides the "paywalled" articles on lescienze.it.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name                Le Scienza Paywall Bypass
// @name:it             Le Scienze Paywall Bypass
// @namespace           KobayashiUserJS
// @version             0.1.7
// @description         Unhides the "paywalled" articles on lescienze.it.
// @description:it      Rimuove il paywall su lescienze.it
// @author              Davide Kobayashi
// @match               https://www.lescienze.it/*
// @license             GPL version 3 or any later version http://www.gnu.org/copyleft/gpl.html
// ==/UserScript==

const addStyle = function(css) {
  /**
   * Inject CSS into the document.
   *
   * This is a standalone implementation of GM_addStyle, which is
   * deprecated by Greasemonkey but still supported by other extensions.
   *
   * Inspired by Tampermonkey's TM_addStyle function, which is
   * Tampermonkey's own implementation of GM_addStyle.
   **/
  try {
    let style = document.createElement('style');
    style.textContent = css;
    var parent = document.head || document.getElementsByTagName('head')[0];
    parent.appendChild(style);
  } catch (e) {
    console.log("Error: " + e);
  }
};

(function () {
  'use strict';
  addStyle(
    `
    div#paywall-banner, #ph-paywall, .block_layout-list, #ls-footer {
      display: none !important;
    }
    #detail-body {
      display: block !important;
      max-height: auto!important;
      overflow: visible !important;
    }
    `
  );
    document.getElementById('detail-body').removeAttribute('hidden')
  window.dispatchEvent(new Event('resize'));
})()