Javascript.RU

Создать новую тему Ответ
 
Опции темы Искать в теме
  #1 (permalink)  
Старый 31.01.2025, 13:50
Интересующийся
Отправить личное сообщение для Sheratan Посмотреть профиль Найти все сообщения от Sheratan
 
Регистрация: 13.09.2023
Сообщений: 27

Отключение сообщения Подтвердить действие
Здравствуйте!
Есть наследственный проект https://ustyuzhna.com/
При открытии главной страницы выходит сообщения "подтвердите свои действия".

You are running version 0 of Adobe Flash player. YouTube player requires Adobe Flash player 8 or higher installed to view everything correctly.

Пытался разобраться, какой скрипт его выдает, но не получилось.

Задача заглушить вывод этого сообщения.
Рассказывать каждому посетителю про настройки браузера не реально.
Т.к. в js не силен, прошу пожалуйста, подскажите что можно сделать (где и как)?

Последний раз редактировалось Sheratan, 31.01.2025 в 13:54.
Ответить с цитированием
  #2 (permalink)  
Старый 31.01.2025, 17:33
Аватар для voraa
Профессор
Отправить личное сообщение для voraa Посмотреть профиль Найти все сообщения от voraa
 
Регистрация: 03.02.2020
Сообщений: 2,777

это сообщение выводит alert в функции initialize из файла utuber.js
Начиная со стр 16 там такой код
this.initialize = function(){
            if (options){
                for (var opt in options)
                    this.options[opt] = options[opt];
            }

            var flashVersion = swfobject.getFlashPlayerVersion().major;
            if (flashVersion < 8)
                alert("You are running version " + flashVersion + " of Adobe Flash player. YouTube player requires Adobe Flash player 8 or higher installed to view everything correctly."); // !!! Тута !!!
Ответить с цитированием
  #3 (permalink)  
Старый 01.02.2025, 01:14
Интересующийся
Отправить личное сообщение для Sheratan Посмотреть профиль Найти все сообщения от Sheratan
 
Регистрация: 13.09.2023
Сообщений: 27

Благодарю!
Все получилось!
Ответить с цитированием
  #4 (permalink)  
Старый Сегодня, 15:04
Новичок на форуме
Отправить личное сообщение для best high yield cd calcul Посмотреть профиль Найти все сообщения от best high yield cd calcul
 
Регистрация: 08.11.2025
Сообщений: 1

# Disabling the Confirm Action Message on Ustyuzhna.com

I understand you want to remove the Adobe Flash Player confirmation message from your website. Since Flash is now obsolete and blocked by modern browsers, this message serves no purpose and only confuses visitors.

Here's a solution to suppress this message:

## JavaScript Solution

Add this code to your website, preferably in the `<head>` section or before the closing `</body>` tag:

```html
<script>
// Disable Flash-related confirmation messages
(function() {
// Override confirm() function to block Flash-related messages
var originalConfirm = window.confirm;
window.confirm = function(message) {
// Check if message contains Flash-related text
if (typeof message === 'string' &&
(message.includes('Adobe Flash Player') ||
message.includes('YouTube Player requires Adobe Flash') ||
message.includes('Confirm your actions'))) {
console.log('Blocked Flash confirmation:', message);
return true; // Automatically confirm without showing dialog
}
// For all other confirm dialogs, use original behavior
return originalConfirm.apply(this, arguments);
};

// Additional protection: Remove Flash-related elements if they exist
setTimeout(function() {
// Remove any Flash objects/embeds that might trigger the message
var flashElements = document.querySelectorAll('object[type="application/x-shockwave-flash"], embed[type="application/x-shockwave-flash"]');
flashElements.forEach(function(el) {
el.parentNode.removeChild(el);
});
}, 100);
})();
</script>
```

## Alternative: HTML Meta Tag Approach

You can also try adding this meta tag to your `<head>` section:

```html
<meta http-equiv="Content-Security-Policy" content="object-src 'none';">
```

## Where to Add This Code

1. **If you have access to the HTML files:**
- Open your main HTML file (usually `index.html`)
- Add the JavaScript code above just before the closing `</body>` tag

2. **If you're using a CMS:**
- Look for theme settings or custom code sections
- Add the JavaScript to the header or footer code injection area

3. **If you can only edit via a plugin:**
- Use a custom code plugin (like "Header and Footer Scripts")
- Add the JavaScript to the site-wide footer section

## Additional Recommendations

Since Flash is no longer supported, you should also:

1. Replace any Flash content with modern HTML5 alternatives
2. Update any old YouTube embed codes to use the current iframe method
3. Check for and remove any obsolete Flash-related scripts

The JavaScript solution above should immediately suppress the confirmation message while preserving other legitimate confirmation dialogs on your site.
Regards
High Yield Cd Calculator
Ответить с цитированием
Ответ



Опции темы Искать в теме
Искать в теме:

Расширенный поиск


Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Форма отправки сообщения с сайта hardwolf Элементы интерфейса 17 24.10.2016 15:00
Система всплывающих сообщений ruslan_mart Ваши сайты и скрипты 32 27.05.2015 21:28
Скрипт интересность сообщения (like unlike) useruser jQuery 2 21.06.2014 20:39
Один обработчик для всех ninzzo Events/DOM/Window 4 02.02.2014 00:27
Резиновые дивы с прокруткой Java Script Mary-Jay Элементы интерфейса 10 24.07.2013 17:51