Link to XPI

Adds direct links to XPI

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey 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.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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!)

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);
    }
}