PTH Fixed submit link

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey 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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==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();
}