True Links for wenku8

Decrypt all flashget links in wenku8.cn

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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 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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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        True Links for wenku8
// @namespace   http://inecmc.blogspot.com
// @description Decrypt all flashget links in wenku8.cn
// @include     http://www.wenku8.cn/*
// @version     0.5
// @grant       none
// ==/UserScript==

(function() {

    var links = document.querySelectorAll("a[onclick^='con']");  
    for(var i=0;i<links.length;i++){
        var dirtyLink = links[i].getAttribute("onclick");
        var start = dirtyLink.indexOf("http");
        var end = dirtyLink.indexOf("',");
        var trueLink = dirtyLink.substring(start,end);
        links[i].removeAttribute("oncontextmenu");
        links[i].removeAttribute("onclick");
        links[i].setAttribute("href",trueLink);      
    }    
})();