Uloz.to Direct Link

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

目前為 2016-06-09 提交的版本,檢視 最新版本

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 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);