您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Open F-Droid images in a new tab when clicked
当前为
- // ==UserScript==
- // @name Open F-Droid Images in New Tab
- // @namespace https://github.com/AbdurazaaqMohammed/userscripts
- // @author Abdurazaaq Mohammed
- // @version 1.0
- // @description Open F-Droid images in a new tab when clicked
- // @match https://f-droid.org/*/packages/*
- // @run-at document-start
- // @grant none
- // @license The Unlicense
- // @homepage https://github.com/AbdurazaaqMohammed/userscripts
- // @supportURL https://github.com/AbdurazaaqMohammed/userscripts/issues
- // ==/UserScript==
- (function() {
- 'use strict';
- const images = document.querySelectorAll('.js_slide.screenshot');
- for (let i = 0; i < images.length; i++) {
- images[i].addEventListener('click', function(e) {
- e.preventDefault();
- window.open(this.querySelector('img').src, '_blank');
- });
- }
- })();