Reveal FOSSHub Real Download URLs

Reveal FOSSHub real download URLs which are pointed by download links

当前为 2017-03-19 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Reveal FOSSHub Real Download URLs
// @namespace   RevealFOSSHubRealDownloadURLs
// @description Reveal FOSSHub real download URLs which are pointed by download links
// @author      jcunews
// @include     https://www.fosshub.com/*
// @version     1
// @grant       none
// ==/UserScript==

(function check() {
  var eles = document.querySelectorAll(".dwl-link"), i, count = eles.length;
  for (i = eles.length-1; i >= 0; i--) {
    if (!eles[i].ok) {
      var attr = eles[i].attributes["fdslwdx"];
      if (attr) {
        eles[i].href = attr.value;
        eles[i].ok = 1;
        count--;
      }
    } else count--;
  }
  if (count) setTimeout(check, 1000);
})();