您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Generates curl commands to download multiple icons from Iconfinder
// ==UserScript== // @name Iconfinder Curl command generator // @namespace Violentmonkey Scripts // @grant none // @include https://www.iconfinder.com/iconsets/* // @version 1.1 // @description:en Generates curl commands to download multiple icons from Iconfinder // @description Generates curl commands to download multiple icons from Iconfinder // ==/UserScript== function getLinks() { var links = ''; var url = ''; $('#icons .downloadlink.btn.btn-small').each(function(v){ url = $(this).attr('href').split('/'); links += 'curl https://www.iconfinder.com'+$(this).attr('href')+" --create-dirs -o "+url[url.length-2]+"/"+url[url.length-4]+"_"+url[url.length-1]+"."+url[url.length-2]+"\n"; }); $('body').html('<pre>'+links+'\n</pre>'); } function addButton(text, onclick) { cssObj = {position: 'fixed', bottom: '5px', right:'5px', 'z-index': 3} let button = document.createElement('button'), btnStyle = button.style document.body.appendChild(button) button.innerHTML = text button.onclick = onclick button.className = 'btn btn-small' btnStyle.position = 'fixed' Object.keys(cssObj).forEach(key => btnStyle[key] = cssObj[key]) return button } addButton('Get Links', getLinks);