您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Adds links to Google Play, F-Droid Archive (by izzysoft) and IzzyOnDroid repo for the packages.
当前为
// ==UserScript== // @name F-Droid.org Supplemental! // @namespace a-pav // @description Adds links to Google Play, F-Droid Archive (by izzysoft) and IzzyOnDroid repo for the packages. // @description Adds required android version and last update date of app to top of page. // @description Press '/' to trigger search and more.. // @match *://f-droid.org/* // @version 1.0 // @run-at document-end // @author a-pav // @grant none // @icon https://f-droid.org/assets/favicon-32x32.png // ==/UserScript== // Set search input shortcut key function setSearchShortcut() { var searchInput = document.querySelector("div.search-input-wrp>input"); if (!searchInput) { return } searchInput.setAttribute("title", " press key / to search "); searchInput.setAttribute("placeholder", " / "); window.addEventListener('keyup', function(e) { if (e.key === "/") { // or e.which: 191 searchInput.focus(); } else if (e.key === "Escape") { // or e.which: 27 searchInput.blur(); } }); } // Set Info-Title (i.e. Required OS version, last pakckage update date) function setInfoTitle() { const infoTitleID = "info-title-summary"; var requiredOS = document.getElementsByClassName("package-version-requirement")[0].innerText.replace(/.*requires /, ""); var lastUpdated = document.getElementsByClassName("package-version-header")[0].innerText.replace(/.*Added on /, ""); var style = ` padding: 10px 0 0px 7px; border-left-style: groove; font-family: 'Roboto'; font-weight: bolder; cursor: pointer; `; document.querySelector("div.package-title").innerHTML += ` <div id="${infoTitleID}" title="Go to Downloads" class="package-summary" style="${style}"> // ${requiredOS} <br> // Update: ${lastUpdated} </div> `; document.getElementById(infoTitleID).addEventListener('click', function() { document.getElementById("latest").scrollIntoView({behavior: "smooth"}); }); } // Set additional links function setAdditionalLinks() { var packageID = window.location.pathname.replace(/.*\/packages\//, "").split("/")[0]; document.querySelector('ul.package-links').innerHTML += ` <li class="package-link"> <a style="font-weight: bold;" href="https://apt.izzysoft.de/fdroid/index/apk/${packageID}?repo=archive"> Archive </a> </li> <li class="package-link"> <a style="font-weight: bold;" href="https://apt.izzysoft.de/fdroid/index/apk/${packageID}"> Izzy Repo </a> </li> <li class="package-link"> <a style="font-weight: bold;" href="https://play.google.com/store/apps/details?id=${packageID}"> Google Play </a> </li> `; } // Colapse permissions summary initially function collapsePerms() { document.getElementById("latest").querySelector(".package-version-permissions>details").removeAttribute("open"); } (function () { setSearchShortcut(); if (window.location.pathname.includes("/packages/")) { // visiting package page, then: setInfoTitle(); setAdditionalLinks(); collapsePerms(); } }());