Guzik

jsfoidfsdgs

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

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