Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Как изменить иконку уведомления в заголовке?

Featured Replies

Posted

Привет!

Когда в реалтайме приходит уведомление и вкладка не открыта, в заголовке (title тег страницы) появляется значок паузы (две вертикальные палочки), как его можно заменить на свой символ?

Создайте значок или кнопку, которые хотите закрепить на исходной монтажной области. Добавьте другие элементы, с которыми вы хотите взаимодействовать, в сторону значка или кнопки цикла. Дублируйте монтажную область и настройте значок или кнопку.
 

  • 3 недели спустя...
  • Author
В 23.06.2021 в 10:21, Desti сказал:

Может это?

<word key="autoUpdateStopped" js="1"><![CDATA[<i class='fa fa-pause'></i> Refresh to resume auto-updates &nbsp;&nbsp;]]></word>

Нет, не это

Там в шапке (<title> тэг) добавляется иконка паузы

12 минут назад, ymd сказал:

Нет, не это

Там в шапке (<title> тэг) добавляется иконка паузы

Это делается jquery, нужно писать mixin плагин для замены (если вы понимаете о чем я)
либо можете ковырять тут: файл \applications\core\data\javascript.xml функция _stopPolling контроллера core.front.core.instantNotifications

		/**
		 * Stops our internal loop from polling for any more notifications
		 *
		 * @returns {void}
		 */
		_stopPolling: function (fatal) {
			Debug.info("Stopping instant notification polling");
			clearInterval( this._interval );
			this._paused = true;
			document.title = "❚❚ " + document.title.replace("❚❚ ", "");
		}

 

Вот еще:

		/**
		 * Handles window visibiliy changes; removes count from title bar
		 *
		 * @returns {void} 
		 */
		windowVisibilityChange: function () {
			var hiddenProp = ips.utils.events.getVisibilityProp();

			if( !_.isUndefined( hiddenProp ) && !document[ hiddenProp] ){
				// Document is now in focus
				this._updateBrowserTitle( 0 );
				this._pollMultiplier = 1;
				this._windowInactivePoll = 0;

				if( this._paused ){
					document.title = document.title.replace( "❚❚ ", '' );
					this._checkNotifications(); // Do an immediate check
					this._setInterval( this._pollTimeout );
				}

				if( this._debugPolling ){
					Debug.log( "Notifications: Resetting inactive poll.");
				}
			}
		},

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.