Script for Pass-Education to download without subscription

This script modifies download links on the Pass-Éducation website to allow file downloads without a subscription. It also removes Google Tag Manager (GTM) iframes that appear on the page.

Autor
TrouveMe
Dnevne instalacije
0
Ukupno instalacija
0
Ocene
0 0 0
Verzija
1.2
Napravljeno
26/04/2025
Ažurirano
26/04/2025
Size
4,11 КБ
Licenca
MIT
Važi za

Link Management Script and Removal of GTM Iframes

Link Management Script and Removal of GTM Iframes

This user script (UserScript) allows you to:

  • Automatically close the cookie consent pop-up, if present, on the page.
  • Remove the login pop-up (if it exists) by removing the element with the class .callout.warning.link-attachment.
  • Update the download links to make them dynamically editable based on the attachment_id and archive_id parameters in the URL.
  • Remove Google Tag Manager (GTM) iframes by observing the addition of iframes with a src containing googletagmanager.com/ns.html.

How the Script Works

1. Updating download links:

  • The script selects links with the class .auth-href.
  • If the link contains an attachment_id parameter, it is replaced with a download URL.
  • If the link contains an archive_id parameter, it is also updated with a new download URL for the archive.

2. Mutation Observer:

  • An observer watches for new elements being added to the page, including .auth-href links added dynamically.
  • The script updates the links as soon as they are added to the page.

3. Removing GTM iframes:

  • When the script detects the addition of an iframe with a src matching Google Tag Manager (googletagmanager.com/ns.html), the iframe is automatically removed.

Installation

  1. Install Tampermonkey or another user script manager.
  2. Create a new script and paste the code above.
  3. Save and enable the script to use it on the target website.

In summary, this script allows you to manage download links and remove Google Tag Manager iframes on the Pass-Éducation website without paying for a subscription.