Discuz-download

Discuz附件下载权限绕过

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name	  Discuz-download
// @version	 1.0
// @run-at	document-end
// @grant	        none
// @description  Discuz附件下载权限绕过
// @supportURL   http://tieba.baidu.com/f?kw=firefox
// @include     http*
// @namespace https://greatest.deepsurf.us/users/54
// ==/UserScript==
for (var e = document.querySelectorAll('dl.tattl'), a, i = e.length - 1; i > -1; i--) {
	(a = e[i]) && (a = a.querySelector('a')) && /&aid=([^&]*)/.test(a.href) && (a.href = a.href.replace(RegExp.$1, encodeURIComponent(btoa(atob(decodeURIComponent(RegExp.$1)).replace(/[^|]*\|([^|]*)$/, '1|$1')))))
}