Extension was not working when YouTube interface is in Arabic because skip buttons have Arabic text and aria-labels.
Added comprehensive Arabic language support with:
تخطي- Skipتخطى- Skip (alternative spelling)تجاوز- Skip/Bypassتخطي الإعلان- Skip Adتخطى الإعلان- Skip Ad (alternative)
button[aria-label*="تخطي"]
button[aria-label*="تخطى"]
button[aria-label*="تجاوز"]
.ad-container button[aria-label*="تخطي"]// Test Arabic language detection
window.adnullTestArabic()// Should return 'ar' for Arabic
window.adnullDebug().language// Look for Arabic skip buttons
document.querySelectorAll('button[aria-label*="تخطي"]')
document.querySelectorAll('button[aria-label*="تخطى"]')
document.querySelectorAll('button[aria-label*="تجاوز"]')
// Look for Arabic text in elements
const buttons = document.querySelectorAll('button, div, span');
Array.from(buttons).filter(btn =>
btn.textContent && (
btn.textContent.includes('تخطي') ||
btn.textContent.includes('تخطى') ||
btn.textContent.includes('تجاوز')
)
);The extension detects Arabic in multiple ways:
document.documentElement.lang // e.g., "ar" or "ar-SA"// YouTube language parameter
new URLSearchParams(window.location.search).get('hl') // e.g., "ar"// Regex pattern for Arabic Unicode range
const arabicPattern = /[\u0600-\u06FF]/;
arabicPattern.test(document.body.textContent)Extension now supports 10+ languages:
| Language | Skip Text Examples |
|---|---|
| Arabic | تخطي، تخطى، تجاوز |
| English | Skip, Skip Ad |
| Spanish | Omitir, Saltar |
| French | Ignorer, Passer |
| German | Überspringen |
| Portuguese | Pular, Ignorar |
| Russian | Пропустить |
| Chinese | 跳过, 跳過 |
| Japanese | スキップ |
| Korean | 건너뛰기 |
detectPageLanguage() {
// Check HTML lang attribute
// Check URL parameters
// Check for Arabic text patterns
// Default to English
}getLanguageSpecificSkipTexts() {
if (language === 'ar') {
// Arabic patterns first, then all others
return ['تخطي', 'تخطى', 'تجاوز', ...allPatterns];
}
return allPatterns;
}- Searches button text content
- Searches aria-label attributes
- Searches multiple element types (button, div, span, a)
- Uses language-specific patterns first
// Check language detection
console.log('Detected language:', window.adnullDebug().language);
// Should show Arabic patterns first
console.log('Skip patterns:', window.adnullDebug().skipTexts);// Manual search for Arabic buttons
window.adnullTestArabic()
// Look at the foundArabicButtons and foundArabicText arrays// Check if buttons are clickable
const arabicButtons = document.querySelectorAll('button[aria-label*="تخطي"]');
arabicButtons.forEach(btn => {
console.log('Button:', btn);
console.log('Clickable:', window.AdNullSkipper.isButtonClickable(btn));
});- Go to YouTube settings
- Change language to العربية (Arabic)
- Or visit:
https://www.youtube.com/?hl=ar
- Find a video with ads
- Open console (F12)
- Run:
window.adnullTestArabic()
{
language: "ar",
isArabic: true,
arabicSkipTexts: ["تخطي", "تخطى", "تجاوز"],
foundArabicButtons: [...], // Should find buttons when ads play
foundArabicText: [...] // Should find text elements
}language: "ar"detected- Arabic skip patterns in debug output
- Arabic buttons found during ads
- Ads are skipped automatically
- Language not detected as "ar"
- No Arabic buttons found
- Buttons found but not clicked
If Arabic support still isn't working:
-
Run full Arabic test:
window.adnullTestArabic()
-
Check language detection:
window.adnullDebug().language
-
Share console output with:
- YouTube URL
- Language settings
- Console test results
- Browser language settings
- v1.0.2 - Added Arabic language support
- v1.0.1 - Enhanced ad detection
- v1.0.0 - Initial modular release
الآن يدعم AdNull اللغة العربية بالكامل! AdNull now fully supports Arabic language! 🇸🇦