Guzik

jsfoidfsdgs

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

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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       Guzik
// @version    0.0.1
// @description jsfoidfsdgs
// @match      https://ufs.pt/index.php?threads*
// @require    https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js
// @namespace https://greasyfork.org/users/1254921
// ==/UserScript==

(function() {
    const css = `
        .wheatButton {
            padding: 5px 10px;
            display: inline-block;
            color: black !important;
            font-size: 11px;
            font-weight: bold;
            font-variant: small-caps;
            text-decoration: none !important;
            background-color: #606060;
            border-radius: 2px;
            cursor: pointer;
            -webkit-font-smoothing: antialiased;
            box-sizing: border-box;
            box-shadow: -2px 2px 1px black;
            border: 1px solid #1b1b1b;
            transition: all 250ms;
            position: fixed;
            right: 5px;
            z-index: 9999; 
        }
        .wheatButton:hover {
            background-color: #1b1b1b;
            color: #d35400 !important;
            box-shadow: -4px 4px 5px black !important;
            border: 1px solid #606060;
            transition: all 250ms;
        }
    `;

    // Add styles to the page
    const node = document.createElement("style");
    node.type = "text/css";
    node.appendChild(document.createTextNode(css));
    document.head.appendChild(node);

    $(document).ready(function () {
        const buttonPositions = [
            { id: "PostTwo", text: "Edytuj Watek", top: 5 },
            { id: "sprawdzam", text: "Edytuj Post ", top: 33 },
        ];

        // Create and append buttons
        buttonPositions.forEach(button => {
            $("<a>", {
                "class": "wheatButton",
                text: button.text,
                id: button.id,
                value: "up",
                type: "button",
                style: `top: ${button.top}px;`
            }).appendTo("body");
        });

        $('#PostTwo').click(testy);
        $('#sprawdzam').click(sprawdzam);
        $('#stamp').click(stamp);


       function testy() {
  $('h4.menu-header:contains("Więcej opcji")').click();

  setTimeout(function() {
    const editLink = $('a.menu-linkRow:contains("Edytuj wątek")');
    if (editLink.length > 0) {
      window.location.href = editLink.attr('href'); 
    } else {
      console.error('error edit');
    }
  }, 500);
}

      function sprawdzam() {
  const editLink = $('a.actionBar-action.actionBar-action--edit').first();

  if (editLink.length > 0) {
    window.location.href = editLink.attr('href');
  } else {
    console.error('error sprawdzam');
  }
}

        function addHide() {
            $(".editpost").first().click();
            setTimeout(() => {
                const editor = $('.cke_enable_context_menu').first();
                editor.val('[hide] ' + editor.val() + '[/hide]');
                $("input[value='Zapisz']").first().click();
            }, 2000);
        }
    });
})();