//
// ==UserScript==
// @name CheatGlobal Sade Panel
// @namespace http://tampermonkey.net/
// @version 4.2
// @description Butonda ne yazıyorsa aynısını mesaja ekler.
// @author BraveUser
// @match https://cheatglobal.com/konu/*
// @match https://cheatglobal.com/threads/*
// @match https://www.cheatglobal.com/konu/*
// @match https://www.cheatglobal.com/threads/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=cheatglobal.com
// @run-at document-idle
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Sadece konu cevaplama alanını takip et
const checkTimer = setInterval(() => {
const replyArea = document.querySelector('.js-quickReply');
if (replyArea) {
const editorBox = replyArea.querySelector('.fr-box') || replyArea.querySelector('.bbWrapper');
if (editorBox && !document.getElementById('cg-simple-btns')) {
createButtons(editorBox);
clearInterval(checkTimer);
}
}
}, 1000);
function createButtons(targetElement) {
const container = document.createElement('div');
container.id = 'cg-simple-btns';
container.style.cssText = 'margin-bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap;';
// BURAYA İSTEDİĞİN METİNLERİ YAZABİLİRSİN
const messages = [
"Eline Sağlık",
"Katılıyorum",
"Teşekkürler",
"Çalışıyor",
"Deneyeceğim",
"Güncel mi?",
"Rezz",
"İyi Satışlar",
"e.s"
];
messages.forEach(msg => {
const btn = document.createElement('button');
btn.innerText = msg;
// Sade Tasarım
btn.style.cssText = `
background: #2c2f33; color: #fff; border: 1px solid #444;
padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 12px;
`;
// Tıklayınca yazıyı ekle
btn.onclick = (e) => {
e.preventDefault();
insertText(msg);
};
container.appendChild(btn);
});
targetElement.parentNode.insertBefore(container, targetElement);
}
function insertText(text) {
const editor = document.querySelector('.js-quickReply .fr-element.fr-view');
if (editor) {
editor.focus();
const p = document.createElement('p');
p.innerText = text;
editor.appendChild(p);
// İmleci sona at
const range = document.createRange();
const sel = window.getSelection();
range.selectNodeContents(editor);
range.collapse(false);
sel.removeAllRanges();
sel.addRange(range);
}
}
})();