PTH Fixed submit link

Add a link that can submit the upload form from anywhere on the page

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         PTH Fixed submit link
// @version      0.3
// @description  Add a link that can submit the upload form from anywhere on the page
// @author       Chameleon
// @include      http*://redacted.ch/upload.php*
// @grant        none
// @namespace https://greasyfork.org/users/87476
// ==/UserScript==

(function() {
  'use strict';

  var a=document.createElement('a');
  document.body.appendChild(a);
  a.href='javascript:void(0);';
  a.setAttribute('style', 'z-index: 1000; display: block; padding: 10px; border-radius: 10px; background: rgba(0,0,0,0.7); color: white; position: fixed; bottom: 10px; margin: auto; left: 0; right: 0; text-align: center; width: 100px; border: rgba(255,255,255,0.3) solid 2px;');
  a.innerHTML = 'Upload torrents';
  a.addEventListener('click', uploadTorrents, false);
})();

function uploadTorrents()
{
  document.getElementById('post').click();
}