// ==UserScript== // @name Greasy Fork Install Button at search // @namespace - // @version 0.4 // @description adds install button at search and at user pages. // @author NotYou // @include *sleazyfork.org/* // @include *greasyfork.org/* // @require http://code.jquery.com/jquery-3.4.1.min.js // @grant none // @license GPL-3.0-or-later // @downloadURL none // ==/UserScript== /* ﹀ Change Log ﹀ 0.4 Version: - Removed HTTP support - Added libraries support 0.3 Version: - SleazyFork support - HTTP support 0.2 Version: - Better css styles identifying */ $(document).ready( function() { 'use strict'; var domain = location.host // STYLES $('head').append(''); // USER SCRIPT $('#user-script-list > li[data-script-type="public"] > article > h2 > a, #browse-script-list > li[data-script-type="public"] > article > h2 > a').each(function() { let scriptId = $(this).parent().parent().parent().data('script-id'); let scriptName = $(this).parent().parent().parent().data('script-name'); $(this).append('Install'); }); // USER STYLE $('#user-script-list > li[data-script-language="css"] > article > h2 > a, #browse-script-list > li[data-script-language="css"] > article > h2 > a').each(function() { let scriptId = $(this).parent().parent().parent().data('script-id'); let scriptName = $(this).parent().parent().parent().data('script-name'); $(this).append('Install as style'); }); // LIBRARIES $('#user-script-list > li[data-script-type="library"] > article > h2 > a, #browse-script-list > li[data-script-type="library"] > article > h2 > a').each(function() { let scriptId = $(this).parent().parent().parent().data('script-id'); let scriptName = $(this).parent().parent().parent().data('script-name'); let scriptNameFinal = scriptName.replace(/\s/g, "-"); $(this).append('Copy URL'); }); });