Link to XPI

Adds direct links to XPI

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

t// ==UserScript==
// @name         Link to XPI
// @namespace    https://github.com/AHOHNMYC
// @version      0.0.1
// @author       AHOHNMYC
// @description  Adds direct links to XPI
// @match        https://addons.mozilla.org/*
// @grant        none
// ==/UserScript==

let jsonEl = document.getElementById`redux-store-state`;
if (jsonEl) {
    let v = JSON.parse(jsonEl.textContent).versions.byId;
	for (let s in v) {
        let l = document.createElement`a`;
        let u = v[s].platformFiles.all.url;
        u = u.substr(0, u.indexOf`?`); // <- url to XPI
        l.href = u;
        l.textContent = `id ${s} : ${u}`;
        l.style.color = 'red';
        document.body.insertBefore(document.createElement`br`, document.body.firstElementChild);
        document.body.insertBefore(l, document.body.firstElementChild);
    }
}