Uloz.to Direct Link

Přímé odkazy ve vyhledávání na Uloz.to

当前为 2016-06-09 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Uloz.to Direct Link
// @namespace    https://github.com/dankerino/ulozto-direct-link
// @version      0.1.5
// @author       dankerino
// @description  Přímé odkazy ve vyhledávání na Uloz.to
// @icon         http://uloz.to/favicon.ico
// @homepageURL  https://github.com/dankerino/ulozto-direct-link
// @supportURL   https://github.com/dankerino/ulozto-direct-link/issues
// @copyright    2015+, dankerino
// @license      MIT License
// @include		 /^https?://.*uloz\.to/(hledej|browse).*$/
// @include		 /^https?://.*ulozto\.cz/(hledej|browse).*$/
// @include		 /^https?://.*ulozto\.sk/(hledej|browse).*$/
// @include		 /^https?://.*ulozto\.net/(hledej|browse).*$/
// @include		 /^https?://.*zachowajto\.pl/(hledej|browse).*$/
// @grant        none
// ==/UserScript==

var max_tries = 10;
var tries = 0;
var time = 500;

function fix_links()
{
    tries++;
    var element_list = document.querySelectorAll(".fileReset");
    if (element_list.length > 1)
    {
        for(i = 1; i < element_list.length; i++)
        {
            var data = element_list[i].getAttribute("data-icon");
            var url = ad.decrypt(kn[data]);
            var attribute = document.createAttribute("href");
            attribute.value = url;
            element_list[i].setAttributeNode(attribute);
        }
    }
    else if (tries < max_tries) window.setTimeout(fix_links, time);
}
window.setTimeout(fix_links, time);