您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add a floating publish button on Greasyfork new script version page
当前为
- // ==UserScript==
- // @name Floating Publish Button on Greasyfork
- // @namespace http://tampermonkey.net/
- // @version 1.0.1
- // @description Add a floating publish button on Greasyfork new script version page
- // @author max5555
- // @license MIT
- // @match https://greasyfork.org/uk/script_versions/new
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- // Create the floating button
- var floatingButton = document.createElement('button');
- floatingButton.innerText = 'Опублікувати скрипт';
- floatingButton.style.position = 'fixed';
- floatingButton.style.bottom = '20px';
- floatingButton.style.right = '20px';
- floatingButton.style.padding = '10px';
- floatingButton.style.backgroundColor = '#4CAF50';
- floatingButton.style.color = 'white';
- floatingButton.style.border = 'none';
- floatingButton.style.borderRadius = '5px';
- floatingButton.style.cursor = 'pointer';
- floatingButton.style.zIndex = '1000';
- // Append the button to the body
- document.body.appendChild(floatingButton);
- // Function to simulate the click on the actual publish button
- floatingButton.addEventListener('click', function() {
- var publishButton = document.querySelector('input[name="commit"][value="Опублікувати скрипт"]');
- if (publishButton) {
- publishButton.click();
- }
- });
- })();