@לב-טוב יש לי סקריפט לטמפרמונקי
// ==UserScript==
// @name Freebuff RTL, Translate & Clean (Ultimate)
// @namespace http://tampermonkey.net/
// @version 7.0
// @description תרגום מלא, כיוון ימין-שמאל, מחיקה פיזית של פרסומות, קרדיטים ונטפרי.
// @author You
// @match https://freebuff.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=freebuff.com
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
// ==========================================
// 1. מילון תרגומים
// ==========================================
const translations = {
"Desktop": "שולחן עבודה",
"CLI": "מסוף (CLI)",
"Web": "אינטרנט",
"Cloud": "ענן",
"Chat": "צ'אט",
"New chat": "שיחה חדשה",
"beta": "בטא",
"BETA": "בטא",
"Live": "לייב",
"Earn": "הרווח",
"Settings": "הגדרות",
"Sign out": "התנתק",
"RECOMMENDED": "מומלץ",
"IMAGES": "תמונות",
"NEW": "חדש",
"Thinks hard & Fast": "חושב לעומק ומהיר",
"Smartest & Fastest · May use data for AI training": "החכם והמהיר ביותר · עשוי להשתמש בנתונים לאימון בינה מלאכותית",
"Balanced": "מאוזן",
"Images · Fastest": "תמונות · המהיר ביותר",
"Deep reasoning · May use data for AI training": "חשיבה עמוקה · עשוי להשתמש בנתונים לאימון",
"ACCOUNT": "חשבון",
"Account": "חשבון",
"Sign-in methods": "שיטות התחברות",
"AI": "בינה מלאכותית",
"AI credentials": "אישורי בינה מלאכותית",
"COMMUNITY": "קהילה",
"Community profile": "פרופיל קהילה",
"PROJECTS": "פרויקטים",
"Transfer projects": "העברת פרויקטים",
"INTEGRATIONS": "שילובים",
"Linked GitHub": "GitHub מקושר",
"Back": "חזור",
"Basic account details for your signed-in Freebuff account.": "פרטי החשבון הבסיסיים עבור חשבון Freebuff המחובר שלך.",
"Name": "שם",
"Email": "אימייל",
"Plan": "תוכנית",
"Role": "תפקיד",
"FREE": "חינם",
"MEMBER": "חבר",
"Link GitHub and Google so you can sign in with either and always land on this same account. Linking GitHub also lets a referral you were invited through count once you use Freebuff.": "קשר חשבונות כדי שתוכל להתחבר תמיד לאותו חשבון. קישור GitHub מאפשר גם ספירת הפניות.",
"Connected": "מחובר",
"Link Google": "קשר את Google",
"Configure the account-wide credentials used by Codex and Claude Code in both Freebuff Web and Cloud.": "הגדר את האישורים ברמת החשבון המשמשים את מנועי הקוד של המערכת.",
"Codex authentication": "אימות Codex",
"Use either ChatGPT OAuth or your own OpenAI API key. Freebuff never falls back to a platform OpenAI key for Codex runs.": "השתמש ב-ChatGPT או במפתח OpenAI שלך. לא נעשה שימוש במפתח פלטפורמה אקראי.",
"Needs setup": "דורש הגדרה",
"OAuth: Not connected · OpenAI key: Not saved": "OAuth: לא מחובר · מפתח OpenAI: לא נשמר",
"Codex model": "מודל Codex",
"Configured": "מוגדר",
"Connect ChatGPT": "חבר את ChatGPT",
"Claude Code provider": "ספק Claude Code",
"Use either an Anthropic API key or an AWS Bedrock bearer token. Freebuff never falls back to platform Anthropic or AWS credentials for Claude Code runs.": "השתמש במפתח Anthropic או באסימון AWS Bedrock.",
"Claude model": "מודל Claude",
"Save": "שמור",
"Credentials are encrypted before storage and applied at run time for all projects under your account.": "האישורים מוצפנים לפני האחסון ומיושמים בזמן הריצה עבור כל הפרויקטים שלך.",
"View profile": "צפה בפרופיל",
"These details are shown on your public community profile.": "פרטים אלה מוצגים בפרופיל הקהילה הציבורי שלך.",
"Bio": "ביוגרפיה",
"A short intro shown on your profile.": "הקדמה קצרה שתוצג בפרופיל שלך.",
"Website": "אתר אינטרנט",
"Twitter": "טוויטר",
"GitHub": "GitHub",
"Save profile": "שמור פרופיל",
"Import projects from an older Freebuff account by verifying the old account email.": "ייבא פרויקטים מחשבון ישן על ידי אימות הדוא\"ל הקודם שלך.",
"Old account email": "אימייל חשבון ישן",
"Send verification code": "שלח קוד אימות",
"Connect GitHub for repository sync and project publishing workflows.": "חבר את GitHub לסנכרון מאגרים ותהליכי פרסום.",
"No GitHub account connected": "לא מחובר חשבון GitHub",
"Thought": "מחשבה",
"DONE": "הושלם",
"Thinker": "מנוע חשיבה"
};
// ==========================================
// 2. הזרקת CSS מותאם אישית (גיבוי להסתרות ועיצוב)
// ==========================================
const css = `
/* כפיית כיוון ימין-שמאל */
html, body {
direction: rtl !important;
text-align: right !important;
}
/* --- העלמת אלמנטים מפריעים ב-CSS --- */
a[data-gravity-ad="true"],
a[href*="trygravity.ai"],
a[rel*="sponsored"],
.workspace-sidebar > div:last-child,
#netfree-popup-window-hand-pull {
display: none !important;
opacity: 0 !important;
pointer-events: none !important;
height: 0 !important;
width: 0 !important;
overflow: hidden !important;
}
/* --- סידור תפריט צד --- */
aside, aside.border-r {
border-right-width: 0 !important;
border-left-width: 1px !important;
border-left-style: solid !important;
border-color: rgba(255, 255, 255, 0.15) !important;
}
.workspace-sidebar button svg,
.workspace-sidebar a svg {
margin-left: 0.5rem !important;
margin-right: 0 !important;
}
.workspace-sidebar p, .workspace-sidebar a, .workspace-sidebar button, .workspace-sidebar label {
text-align: right !important;
}
/* --- סידור שורת הכתיבה --- */
textarea, input {
direction: rtl !important;
text-align: right !important;
}
.relative.rounded-composer .flex.items-center.justify-between {
flex-direction: row !important;
}
.relative.rounded-composer .flex.items-center.justify-between > div {
flex-direction: row !important;
}
/* --- תיאורי מודלים קריאים וברורים --- */
[role="menuitem"] .text-content-subtle,
[role="menuitem"] span:nth-child(2) {
white-space: normal !important;
line-height: 1.4 !important;
margin-top: 4px !important;
display: block !important;
text-align: right !important;
}
/* --- תפריטים קופצים וחלונות הגדרות --- */
[role="menu"], [role="dialog"], [data-radix-popper-content-wrapper], main {
direction: rtl !important;
text-align: right !important;
}
[role="menuitem"] svg {
margin-left: 0.5rem !important;
margin-right: 0 !important;
}
`;
const injectCSS = new MutationObserver(() => {
if (document.head) {
const style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
document.head.appendChild(style);
injectCSS.disconnect();
}
});
injectCSS.observe(document.documentElement, { childList: true });
// ==========================================
// 3. מנוע מחיקת פרסומות פיזית מהקוד (אגרסיבי)
// ==========================================
function removeAds(targetNode) {
if (!targetNode || !targetNode.querySelectorAll) return;
// חיפוש כל הפרסומות המוכרות ומחיקתן לחלוטין מהקוד
const ads = targetNode.querySelectorAll('a[data-gravity-ad="true"], a[href*="trygravity.ai"], a[rel*="sponsored"]');
ads.forEach(ad => ad.remove());
// טיפול במקרה שבו האלמנט שנוסף הוא בעצמו הפרסומת
if (targetNode.tagName === 'A') {
if (targetNode.getAttribute('data-gravity-ad') === 'true' ||
(targetNode.href && targetNode.href.includes('trygravity.ai')) ||
(targetNode.rel && targetNode.rel.includes('sponsored'))) {
targetNode.remove();
}
}
}
// ==========================================
// 4. מנוע תרגום
// ==========================================
function translateDOM(targetNode) {
if (!targetNode || !targetNode.querySelectorAll) return;
const walker = document.createTreeWalker(targetNode, NodeFilter.SHOW_TEXT, null, false);
let node;
while (node = walker.nextNode()) {
let text = node.nodeValue.trim();
let cleanText = text.replace(/^\.|\.$/g, "").trim();
if (translations[text]) {
node.nodeValue = node.nodeValue.replace(text, translations[text]);
} else if (translations[cleanText]) {
node.nodeValue = node.nodeValue.replace(cleanText, translations[cleanText]);
}
}
const inputs = targetNode.querySelectorAll('input, textarea');
inputs.forEach(input => translatePlaceholder(input));
if (targetNode.tagName === 'INPUT' || targetNode.tagName === 'TEXTAREA') {
translatePlaceholder(targetNode);
}
}
function translatePlaceholder(inputEl) {
let ph = inputEl.getAttribute('placeholder');
if (ph === 'Ask anything') {
inputEl.setAttribute('placeholder', 'שאל משהו...');
} else if (ph === 'Search chats') {
inputEl.setAttribute('placeholder', 'חיפוש שיחות...');
} else if (ph === 'Write a short bio...') {
inputEl.setAttribute('placeholder', 'כתוב ביוגרפיה קצרה...');
} else if (ph === 'Paste AWS_BEARER_TOKEN_BEDROCK') {
inputEl.setAttribute('placeholder', 'הדבק AWS_BEARER_TOKEN_BEDROCK');
}
}
// ==========================================
// 5. ניהול שינויים בזמן אמת (Observer)
// ==========================================
const observer = new MutationObserver((mutations) => {
mutations.forEach(mutation => {
if (mutation.type === 'childList') {
mutation.addedNodes.forEach(node => {
if (node.nodeType === Node.ELEMENT_NODE) {
removeAds(node); // קודם מוחק פרסומות
translateDOM(node); // ואז מתרגם
} else if (node.nodeType === Node.TEXT_NODE) {
let text = node.nodeValue.trim();
let cleanText = text.replace(/^\.|\.$/g, "").trim();
if (translations[text]) node.nodeValue = node.nodeValue.replace(text, translations[text]);
else if (translations[cleanText]) node.nodeValue = node.nodeValue.replace(cleanText, translations[cleanText]);
}
});
} else if (mutation.type === 'attributes' && mutation.attributeName === 'placeholder') {
translatePlaceholder(mutation.target);
}
});
});
const startObserver = setInterval(() => {
if (document.body) {
clearInterval(startObserver);
removeAds(document.body);
translateDOM(document.body);
observer.observe(document.body, {
childList: true,
subtree: true,
attributes: true,
attributeFilter: ['placeholder']
});
}
}, 100);
// ==========================================
// 6. גיבוי שוטף למחיקת פרסומות ו-RTL
// ==========================================
setInterval(() => {
if (document.documentElement.getAttribute('dir') !== 'rtl') {
document.documentElement.setAttribute('dir', 'rtl');
}
// פעולת טאטוא קבועה נגד פרסומות עקשניות כל שניה
if (document.body) {
removeAds(document.body);
}
}, 1000);
})();