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.

As of 2025-04-26. See the latest version.

Author
TrouveMe
Ratings
0 0 0
Version
1.1
Created
2025-04-26
Updated
2025-04-26
Size
3.96 KB
License
MIT
Applies to

Link Management and GTM iframe Removal Script

This user script performs the following actions:

  1. Automatically closes the cookie consent pop-up if present on the page.
  2. Removes the login pop-up (if it exists) by deleting the element with the class .callout.warning.link-attachment.
  3. Dynamically updates download links based on the attachment_id and archive_id parameters found in the URL.
  4. Removes Google Tag Manager (GTM) iframes by observing iframes with a src containing googletagmanager.com/ns.html.

How the script works

  1. Updating Download Links:

    • The script selects links with the .auth-href class.
    • 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 archive download URL.
  2. Mutation Observer:

    • The 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 corresponding to Google Tag Manager (googletagmanager.com/ns.html), the iframe is automatically removed.

Installation

  1. Install Tampermonkey or another userscript manager.
  2. Create a new script and paste the above code into it.
  3. Save and activate the script to use it on the relevant website.
长期地址
遇到问题?请前往 GitHub 提 Issues。