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.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
TrouveMe
今日安裝
0
安裝總數
6
評價
0 0 0
版本
1.2
建立日期
2025-04-26
更新日期
2025-04-26
尺寸
4.1 KB
授權條款
MIT
腳本執行於

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.