Переглянути джерело

#2506 Remove add to homepage widget for mobiles

Alex Trofimov 6 роки тому
батько
коміт
eefeff88df

+ 6 - 0
inc/classes/BxDolTemplate.php

@@ -1010,6 +1010,12 @@ class BxDolTemplate extends BxDolFactory implements iBxDolSingleton
 			<meta property="og:title" content="' . (isset($this->aPage['header']) ? bx_html_attribute(strip_tags($this->aPage['header'])) : '') . '" />
 			<meta property="og:description" content="' . ($bDescription ? bx_html_attribute($this->aPage['description']) : '') . '" />';
 
+        // Smart App Banner
+        if (getParam('smart_app_banner') && false === strpos($_SERVER['HTTP_USER_AGENT'], 'UNAMobileApp')) {
+            if ($sAppIdIOS = getParam('smart_app_banner_ios_app_id'))
+                $sRet .= '<meta name="apple-itunes-app" content="app-id=' . $sAppIdIOS . '" />';
+        }
+
         // RSS
         $oFunctions = BxTemplFunctions::getInstance();
         $sRet .= $oFunctions->getManifests();

+ 3 - 1
install/sql/system.sql

@@ -473,12 +473,14 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, 'site_email_notify', '_adm_stg_cpt_option_site_email_notify', 'admin@example.com', 'digit', '', '', '', 3),
 (@iCategoryId, 'site_tour_home', '_adm_stg_cpt_option_site_tour_home', 'on', 'checkbox', '', '', '', 6),
 (@iCategoryId, 'site_tour_studio', '_adm_stg_cpt_option_site_tour_studio', 'on', 'checkbox', '', '', '', 7),
-(@iCategoryId, 'add_to_mobile_homepage', '_adm_stg_cpt_option_add_to_mobile_homepage', 'on', 'checkbox', '', '', '', 8),
 (@iCategoryId, 'site_login_social_compact', '_adm_stg_cpt_option_site_login_social_compact', '', 'checkbox', '', '', '', 9),
 
 (@iCategoryId, 'sys_autoupdate', '_adm_stg_cpt_option_sys_autoupdate', 'on', 'checkbox', '', '', '', 10),
 (@iCategoryId, 'sys_autoupdate_force_modified_files', '_adm_stg_cpt_option_sys_autoupdate_force_modified_files', '', 'checkbox', '', '', '', 12),
 
+(@iCategoryId, 'smart_app_banner', '_adm_stg_cpt_option_smart_app_banner', '', 'checkbox', '', '', '', 14),
+(@iCategoryId, 'smart_app_banner_ios_app_id', '_adm_stg_cpt_option_smart_app_banner_ios_app_id', '', 'digit', '', '', '', 15),
+
 (@iCategoryId, 'sys_per_page_search_keyword_single', '_adm_stg_cpt_option_sys_per_page_search_keyword_single', '24', 'digit', '', '', '', 20),
 (@iCategoryId, 'sys_per_page_search_keyword_plural', '_adm_stg_cpt_option_sys_per_page_search_keyword_plural', '3', 'digit', '', '', '', 21),
 

+ 2 - 1
modules/boonex/english/data/langs/system/en.xml

@@ -1355,7 +1355,8 @@
 	<string name="_adm_stg_cpt_option_site_title"><![CDATA[Site title]]></string>
 	<string name="_adm_stg_cpt_option_site_tour_home"><![CDATA[Site home page tour]]></string>
     <string name="_adm_stg_cpt_option_site_tour_studio"><![CDATA[Studio home page tour]]></string>
-    <string name="_adm_stg_cpt_option_add_to_mobile_homepage"><![CDATA[Add to mobile homepage widget]]></string>
+    <string name="_adm_stg_cpt_option_smart_app_banner"><![CDATA[Smart App Banner]]></string>
+    <string name="_adm_stg_cpt_option_smart_app_banner_ios_app_id"><![CDATA[iOS app ID for Smart App Banner]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_activation_letter"><![CDATA[Enable account activation letter]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_confirmation_type"><![CDATA[Account is confirmed when]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_2fa_enable"><![CDATA[Enable 2 Factor Authentication]]></string>

+ 2 - 1
modules/boonex/russian/data/langs/system/ru.xml

@@ -1342,7 +1342,8 @@
 	<string name="_adm_stg_cpt_option_site_title"><![CDATA[Название сайта]]></string>
 	<string name="_adm_stg_cpt_option_site_tour_home"><![CDATA[Экскурсия по главной странице сайта]]></string>
     <string name="_adm_stg_cpt_option_site_tour_studio"><![CDATA[Экскурсия по главной странице Студии]]></string>
-    <string name="_adm_stg_cpt_option_add_to_mobile_homepage"><![CDATA[Компонент для добавления сайта на мобильное устройство]]></string>
+    <string name="_adm_stg_cpt_option_smart_app_banner"><![CDATA[Smart App Banner]]></string>
+    <string name="_adm_stg_cpt_option_smart_app_banner_ios_app_id"><![CDATA[Идентификатор iOS прилижения для Smart App Banner]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_activation_letter"><![CDATA[Включить сообщение об активации аккаунта]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_confirmation_type"><![CDATA[Аккаунт подтвержден когда]]></string>
 	<string name="_adm_stg_cpt_option_sys_account_2fa_enable"><![CDATA[Включить двухфакторную аутентификацию]]></string>

+ 0 - 46
plugins_public/cubiq-add-to-homescreen/README.md

@@ -1,46 +0,0 @@
-# Add to Homescreen call out
-
-Script for mobile devices, it automatically shows an overlaying message encouraging to add the web app to the homescreen. Compatible with iOS 6+ and Chrome for Android (soon WinPhone).
-
-## Installation
-
-Add `addtohomescreen.css` and `addtohomescreen.js` to the head of your projects index file. Then, call `addToHomescreen();` as soon as possible. For example:
-
-```html
-<head>
-<title>Add To Home</title>
-...
-<link rel="stylesheet" type="text/css" href="../../style/addtohomescreen.css">
-<script src="../../src/addtohomescreen.js"></script>
-<script>
-addToHomescreen();
-</script>
-</head>
-```
-
-For more, consult the [project website](http://cubiq.org/add-to-home-screen).
-
-## License
-
-Copyright (c) 2014 Matteo Spinelli, http://cubiq.org/
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.

+ 0 - 750
plugins_public/cubiq-add-to-homescreen/addtohomescreen.js

@@ -1,750 +0,0 @@
-/* Add to Homescreen v3.2.3 ~ (c) 2015 Matteo Spinelli ~ @license: http://cubiq.org/license */
-(function (window, document) {
-/*
-       _   _ _____     _____
- ___ _| |_| |_   _|___|  |  |___ _____ ___ ___ ___ ___ ___ ___ ___
-| .'| . | . | | | | . |     | . |     | -_|_ -|  _|  _| -_| -_|   |
-|__,|___|___| |_| |___|__|__|___|_|_|_|___|___|___|_| |___|___|_|_|
-                              by Matteo Spinelli ~ http://cubiq.org
-*/
-
-// Check for addEventListener browser support (prevent errors in IE<9)
-var _eventListener = 'addEventListener' in window;
-
-// Check if document is loaded, needed by autostart
-var _DOMReady = false;
-if ( document.readyState === 'complete' ) {
-	_DOMReady = true;
-} else if ( _eventListener ) {
-	window.addEventListener('load', loaded, false);
-}
-
-function loaded () {
-	window.removeEventListener('load', loaded, false);
-	_DOMReady = true;
-}
-
-// regex used to detect if app has been added to the homescreen
-var _reSmartURL = /\/ath(\/)?$/;
-var _reQueryString = /([\?&]ath=[^&]*$|&ath=[^&]*(&))/;
-
-// singleton
-var _instance;
-function ath (options) {
-	_instance = _instance || new ath.Class(options);
-
-	return _instance;
-}
-
-// message in all supported languages
-ath.intl = {
-	cs_cs: {
-		ios: 'Pro přidáni této webové aplikace na úvodní obrazovku: stlačte %icon a pak <strong>Přidat na úvodní obrazovku</strong>.',
-		android: 'Pro přidáni této webové aplikace na úvodní obrazovku otevřete menu nastavení prohlížeče a stlačte <strong>Přidat na úvodní obrazovku</strong>. <small>K menu se dostanete stlačením hardwaroveho tlačítka, když ho vaše zařízení má, nebo stlačením pravé horní menu ikony <span class="ath-action-icon">icon</span>.</small>'
-	},
-
-	de_de: {
-		ios: 'Um diese Web-App zum Home-Bildschirm hinzuzufügen, tippen Sie auf %icon und dann <strong>Zum Home-Bildschirm</strong>.',
-		android: 'Um diese Web-App zum Home-Bildschirm hinzuzufügen, öffnen Sie das Menü und tippen dann auf <strong>Zum Startbildschirm hinzufügen</strong>. <small>Wenn Ihr Gerät eine Menütaste hat, lässt sich das Browsermenü über diese öffnen. Ansonsten tippen Sie auf %icon.</small>'
-	},
-
-	da_dk: {
-		ios: 'For at tilføje denne web app til hjemmeskærmen: Tryk %icon og derefter <strong>Føj til hjemmeskærm</strong>.',
-		android: 'For at tilføje denne web app til hjemmeskærmen, åbn browser egenskaber menuen og tryk på <strong>Føj til hjemmeskærm</strong>. <small>Denne menu kan tilgås ved at trykke på menu knappen, hvis din enhed har en, eller ved at trykke på det øverste højre menu ikon %icon.</small>'
-	},
-
-	el_gr: {
-		ios: 'Για να προσθέσετε την εφαρμογή στην αρχική οθόνη: πατήστε το %icon και μετά <strong>Πρόσθεσε στην αρχική οθόνη</strong>.',
-		android: 'Για να προσθέσετε την εφαρμογή στην αρχική οθόνη, ανοίξτε τις επιλογές του browser σας και πατήστε το <strong>Προσθήκη στην αρχική οθόνη</strong>. <small>Μπορείτε να έχετε πρόσβαση στο μενού, πατώντας το κουμπί του μενού του κινητού σας ή το πάνω δεξιά κουμπί του μενού %icon.</small>'
-	},
-
-	en_us: {
-		ios: 'To add this web app to the home screen: tap %icon and then <strong>Add to Home Screen</strong>.',
-		android: 'To add this web app to the home screen open the browser option menu and tap on <strong>Add to homescreen</strong>. <small>The menu can be accessed by pressing the menu hardware button if your device has one, or by tapping the top right menu icon %icon.</small>'
-	},
-
-	es_es: {
-		ios: 'Para añadir esta aplicación web a la pantalla de inicio: pulsa %icon y selecciona <strong>Añadir a pantalla de inicio</strong>.',
-		android: 'Para añadir esta aplicación web a la pantalla de inicio, abre las opciones y pulsa <strong>Añadir a pantalla inicio</strong>. <small>El menú se puede acceder pulsando el botón táctil en caso de tenerlo, o bien el icono de la parte superior derecha de la pantalla %icon.</small>'
-	},
-
-	fi_fi: {
-		ios: 'Liitä tämä sovellus kotivalikkoon: klikkaa %icon ja tämän jälkeen <strong>Lisää kotivalikkoon</strong>.',
-		android: 'Lisätäksesi tämän sovelluksen aloitusnäytölle, avaa selaimen valikko ja klikkaa tähti -ikonia tai <strong>Lisää aloitusnäytölle tekstiä</strong>. <small>Valikkoon pääsee myös painamalla menuvalikkoa, jos laitteessasi on sellainen tai koskettamalla oikealla yläkulmassa menu ikonia %icon.</small>'
-	},
-
-	fr_fr: {
-		ios: 'Pour ajouter cette application web sur l\'écran d\'accueil : Appuyez %icon et sélectionnez <strong>Ajouter sur l\'écran d\'accueil</strong>.',
-		android: 'Pour ajouter cette application web sur l\'écran d\'accueil : Appuyez sur le bouton "menu", puis sur <strong>Ajouter sur l\'écran d\'accueil</strong>. <small>Le menu peut-être accessible en appuyant sur le bouton "menu" du téléphone s\'il en possède un <i class="fa fa-bars"></i>. Sinon, il se trouve probablement dans la coin supérieur droit du navigateur %icon.</small>'
-	},
-
-	he_il: {
-		ios: '<span dir="rtl">להוספת האפליקציה למסך הבית: ללחוץ על %icon ואז <strong>הוסף למסך הבית</strong>.</span>',
-		android: 'To add this web app to the home screen open the browser option menu and tap on <strong>Add to homescreen</strong>. <small>The menu can be accessed by pressing the menu hardware button if your device has one, or by tapping the top right menu icon %icon.</small>'
-	},
-
-	hu_hu: {
-		ios: 'Ha hozzá szeretné adni ezt az alkalmazást a kezdőképernyőjéhez, érintse meg a következő ikont: %icon , majd a <strong>Hozzáadás a kezdőképernyőhöz</strong> menüpontot.',
-		android: 'Ha hozzá szeretné adni ezt az alkalmazást a kezdőképernyőjéhez, a böngésző menüjében kattintson a <strong>Hozzáadás a kezdőképernyőhöz</strong> menüpontra. <small>A böngésző menüjét a következő ikon megérintésével tudja megnyitni: %icon.</small>'
-	},
-
-	it_it: {
-		ios: 'Per aggiungere questa web app alla schermata iniziale: premi %icon e poi <strong>Aggiungi a Home</strong>.',
-		android: 'Per aggiungere questa web app alla schermata iniziale, apri il menu opzioni del browser e premi su <strong>Aggiungi alla homescreen</strong>. <small>Puoi accedere al menu premendo il pulsante hardware delle opzioni se la tua device ne ha uno, oppure premendo l\'icona %icon in alto a destra.</small>'
-	},
-
-	ja_jp: {
-		ios: 'このウェプアプリをホーム画面に追加するには、%iconをタップして<strong>ホーム画面に追加</strong>してください。',
-		android: 'このウェプアプリをホーム画面に追加するには、ブラウザのオプションメニューから<strong>ホーム画面に追加</strong>をタップしてください。<small>オプションメニューは、一部の機種ではデバイスのメニューボタンから、それ以外では画面右上の%iconからアクセスできます。</small>'
- 	},
-
-	ko_kr: {
-		ios: '홈 화면에 바로가기 생성: %icon 을 클릭한 후 <strong>홈 화면에 추가</strong>.',
-		android: '브라우저 옵션 메뉴의 <string>홈 화면에 추가</string>를 클릭하여 홈화면에 바로가기를 생성할 수 있습니다. <small>옵션 메뉴는 장치의 메뉴 버튼을 누르거나 오른쪽 상단의 메뉴 아이콘 %icon을 클릭하여 접근할 수 있습니다.</small>'
-	},
-
-	nb_no: {
-		ios: 'For å installere denne appen på hjem-skjermen: trykk på %icon og deretter <strong>Legg til på Hjem-skjerm</strong>.',
-		android: 'For å legge til denne webappen på startsiden åpner en nettlesermenyen og velger <strong>Legg til på startsiden</strong>. <small>Menyen åpnes ved å trykke på den fysiske menyknappen hvis enheten har det, eller ved å trykke på menyikonet øverst til høyre %icon.</small>'
-	},
-
-	pt_br: {
-		ios: 'Para adicionar este app à tela de início: clique %icon e então <strong>Tela de início</strong>.',
-		android: 'Para adicionar este app à tela de início, abra o menu de opções do navegador e selecione <strong>Adicionar à tela inicial</strong>. <small>O menu pode ser acessado pressionando o "menu" button se o seu dispositivo tiver um, ou selecionando o ícone %icon no canto superior direito.</small>'
-	},
-
-	pt_pt: {
-		ios: 'Para adicionar esta app ao ecrã principal: clique %icon e depois <strong>Ecrã principal</strong>.',
-		android: 'Para adicionar esta app web ecrã principal, abra o menu de opções do navegador e selecione <strong>Adicionar à tela inicial</strong>. <small>O menu pode ser acessado pressionando o "menu" button se o seu dispositivo tiver um, ou selecionando o ícone %icon no canto superior direito.</small>'
-	},
-
-	nl_nl: {
-		ios: 'Om deze webapp aan je startscherm toe te voegen, klik op %icon en dan <strong>Zet in startscherm</strong>.',
-		android: 'Om deze webapp aan je startscherm toe te voegen, open de browserinstellingen en tik op <strong>Toevoegen aan startscherm</strong>. <small>Gebruik de "menu" knop als je telefoon die heeft, anders het menu-icoon rechtsbovenin %icon.</small>'
-	},
-
-	ru_ru: {
-		ios: 'Чтобы добавить этот сайт на свой домашний экран, нажмите на иконку %icon и затем <strong>На экран "Домой"</strong>.',
-		android: 'Чтобы добавить сайт на свой домашний экран, откройте меню браузера и нажмите на <strong>Добавить на главный экран</strong>. <small>Меню можно вызвать, нажав на кнопку меню вашего телефона, если она есть. Или найдите иконку сверху справа %icon[иконка].</small>'
-	},
-
-	sk_sk: {
-		ios: 'Pre pridanie tejto webovej aplikácie na úvodnú obrazovku: stlačte %icon a potom <strong>Pridať na úvodnú obrazovku</strong>.',
-		android: 'Pre pridanie tejto webovej aplikácie na úvodnú obrazovku otvorte menu nastavenia prehliadača a stlačte <strong>Pridať na úvodnú obrazovku</strong>. <small>K menu sa dostanete stlačením hardwaroveho tlačidla, ak ho vaše zariadenie má, alebo stlačením pravej hornej menu ikony <span class="ath-action-icon">icon</span>.</small>'
-	},
-
-	sv_se: {
-		ios: 'För att lägga till denna webbapplikation på hemskärmen: tryck på %icon och därefter <strong>Lägg till på hemskärmen</strong>.',
-		android: 'För att lägga till den här webbappen på hemskärmen öppnar du webbläsarens alternativ-meny och väljer <strong>Lägg till på startskärmen</strong>. <small>Man hittar menyn genom att trycka på hårdvaruknappen om din enhet har en sådan, eller genom att trycka på menyikonen högst upp till höger %icon.</small>'
-	},
-
-	tr_tr: {
-		ios: 'Uygulamayı ana ekrana eklemek için, %icon ve ardından <strong>ana ekrana ekle</strong> butonunu tıklayın.',
-		android: 'Uygulamayı ana ekrana eklemek için, menüye girin ve <strong>ana ekrana ekle</strong> butonunu tıklayın. <small>Cihazınız menü tuşuna sahip ise menüye girmek için menü tuşunu tıklayın. Aksi takdirde %icon butonunu tıklayın.</small>'
-	},
-
-	uk_ua: {
-		ios: 'Щоб додати цей сайт на початковий екран, натисніть %icon, а потім <strong>На початковий екран</strong>.',
-		android: 'Щоб додати цей сайт на домашній екран, відкрийте меню браузера та виберіть <strong>Додати на головний екран</strong>. <small>Це можливо зробити, натиснувши кнопку меню на вашому смартфоні, якщо така є. Або ж на іконці зверху справа %icon.</small>'
-	},
-
-	zh_cn: {
-		ios: '如要把应用程序加至主屏幕,请点击%icon, 然后<strong>添加到主屏幕</strong>',
-		android: 'To add this web app to the home screen open the browser option menu and tap on <strong>Add to homescreen</strong>. <small>The menu can be accessed by pressing the menu hardware button if your device has one, or by tapping the top right menu icon %icon.</small>'
-	},
-
-	zh_tw: {
-		ios: '如要把應用程式加至主屏幕, 請點擊%icon, 然後<strong>加至主屏幕</strong>.',
-		android: 'To add this web app to the home screen open the browser option menu and tap on <strong>Add to homescreen</strong>. <small>The menu can be accessed by pressing the menu hardware button if your device has one, or by tapping the top right menu icon %icon.</small>'
-	}
-};
-
-// Add 2 characters language support (Android mostly)
-for ( var lang in ath.intl ) {
-	ath.intl[lang.substr(0, 2)] = ath.intl[lang];
-}
-
-// default options
-ath.defaults = {
-	appID: 'org.cubiq.addtohome',		// local storage name (no need to change)
-	fontSize: 15,				// base font size, used to properly resize the popup based on viewport scale factor
-	debug: false,				// override browser checks
-	logging: false,				// log reasons for showing or not showing to js console; defaults to true when debug is true
-	modal: false,				// prevent further actions until the message is closed
-	mandatory: false,			// you can't proceed if you don't add the app to the homescreen
-	autostart: true,			// show the message automatically
-	skipFirstVisit: false,		// show only to returning visitors (ie: skip the first time you visit)
-	startDelay: 1,				// display the message after that many seconds from page load
-	lifespan: 15,				// life of the message in seconds
-	displayPace: 1440,			// minutes before the message is shown again (0: display every time, default 24 hours)
-	maxDisplayCount: 0,			// absolute maximum number of times the message will be shown to the user (0: no limit)
-	icon: true,					// add touch icon to the message
-	message: '',				// the message can be customized
-	validLocation: [],			// list of pages where the message will be shown (array of regexes)
-	onInit: null,				// executed on instance creation
-	onShow: null,				// executed when the message is shown
-	onRemove: null,				// executed when the message is removed
-	onAdd: null,				// when the application is launched the first time from the homescreen (guesstimate)
-	onPrivate: null,			// executed if user is in private mode
-	privateModeOverride: false,	// show the message even in private mode (very rude)
-	detectHomescreen: false		// try to detect if the site has been added to the homescreen (false | true | 'hash' | 'queryString' | 'smartURL')
-};
-
-// browser info and capability
-var _ua = window.navigator.userAgent;
-
-var _nav = window.navigator;
-_extend(ath, {
-	hasToken: document.location.hash == '#ath' || _reSmartURL.test(document.location.href) || _reQueryString.test(document.location.search),
-	isRetina: window.devicePixelRatio && window.devicePixelRatio > 1,
-	isIDevice: (/iphone|ipod|ipad/i).test(_ua),
-	isMobileChrome: _ua.indexOf('Android') > -1 && (/Chrome\/[.0-9]*/).test(_ua) && _ua.indexOf("Version") == -1,
-	isMobileIE: _ua.indexOf('Windows Phone') > -1,
-	language: _nav.language && _nav.language.toLowerCase().replace('-', '_') || ''
-});
-
-// falls back to en_us if language is unsupported
-ath.language = ath.language && ath.language in ath.intl ? ath.language : 'en_us';
-
-ath.isMobileSafari = ath.isIDevice && _ua.indexOf('Safari') > -1 && _ua.indexOf('CriOS') < 0;
-ath.OS = ath.isIDevice ? 'ios' : ath.isMobileChrome ? 'android' : ath.isMobileIE ? 'windows' : 'unsupported';
-
-ath.OSVersion = _ua.match(/(OS|Android) (\d+[_\.]\d+)/);
-ath.OSVersion = ath.OSVersion && ath.OSVersion[2] ? +ath.OSVersion[2].replace('_', '.') : 0;
-
-ath.isStandalone = 'standalone' in window.navigator && window.navigator.standalone;
-ath.isTablet = (ath.isMobileSafari && _ua.indexOf('iPad') > -1) || (ath.isMobileChrome && _ua.indexOf('Mobile') < 0);
-
-ath.isCompatible = (ath.isMobileSafari && ath.OSVersion >= 6) || ath.isMobileChrome;	// TODO: add winphone
-
-var _defaultSession = {
-	lastDisplayTime: 0,			// last time we displayed the message
-	returningVisitor: false,	// is this the first time you visit
-	displayCount: 0,			// number of times the message has been shown
-	optedout: false,			// has the user opted out
-	added: false				// has been actually added to the homescreen
-};
-
-ath.removeSession = function (appID) {
-	try {
-		if (!localStorage) {
-			throw new Error('localStorage is not defined');
-		}
-
-		localStorage.removeItem(appID || ath.defaults.appID);
-	} catch (e) {
-		// we are most likely in private mode
-	}
-};
-
-ath.doLog = function (logStr) {
-	if ( this.options.logging ) {
-		console.log(logStr);
-	}
-};
-
-ath.Class = function (options) {
-	// class methods
-	this.doLog = ath.doLog;
-
-	// merge default options with user config
-	this.options = _extend({}, ath.defaults);
-	_extend(this.options, options);
-	// override defaults that are dependent on each other
-	if ( this.options && this.options.debug && (typeof this.options.logging === "undefined") ) {
-		this.options.logging = true;
-	}
-
-	// IE<9 so exit (I hate you, really)
-	if ( !_eventListener ) {
-		return;
-	}
-
-	// normalize some options
-	this.options.mandatory = this.options.mandatory && ( 'standalone' in window.navigator || this.options.debug );
-	this.options.modal = this.options.modal || this.options.mandatory;
-	if ( this.options.mandatory ) {
-		this.options.startDelay = -0.5;		// make the popup hasty
-	}
-	this.options.detectHomescreen = this.options.detectHomescreen === true ? 'hash' : this.options.detectHomescreen;
-
-	// setup the debug environment
-	if ( this.options.debug ) {
-		ath.isCompatible = true;
-		ath.OS = typeof this.options.debug == 'string' ? this.options.debug : ath.OS == 'unsupported' ? 'android' : ath.OS;
-		ath.OSVersion = ath.OS == 'ios' ? '8' : '4';
-	}
-
-	// the element the message will be appended to
-	this.container = document.body;
-
-	// load session
-	this.session = this.getItem(this.options.appID);
-	this.session = this.session ? JSON.parse(this.session) : undefined;
-
-	// user most likely came from a direct link containing our token, we don't need it and we remove it
-	if ( ath.hasToken && ( !ath.isCompatible || !this.session ) ) {
-		ath.hasToken = false;
-		_removeToken();
-	}
-
-	// the device is not supported
-	if ( !ath.isCompatible ) {
- 		this.doLog("Add to homescreen: not displaying callout because device not supported");
-		return;
-	}
-
-	this.session = this.session || _defaultSession;
-
-	// check if we can use the local storage
-	try {
-		if (!localStorage) {
-			throw new Error('localStorage is not defined');
-		}
-
-		localStorage.setItem(this.options.appID, JSON.stringify(this.session));
-		ath.hasLocalStorage = true;
-	} catch (e) {
-		// we are most likely in private mode
-		ath.hasLocalStorage = false;
-
-		if ( this.options.onPrivate ) {
-			this.options.onPrivate.call(this);
-		}
-	}
-
-	// check if this is a valid location
-	var isValidLocation = !this.options.validLocation.length;
-	for ( var i = this.options.validLocation.length; i--; ) {
-		if ( this.options.validLocation[i].test(document.location.href) ) {
-			isValidLocation = true;
-			break;
-		}
-	}
-
-	// check compatibility with old versions of add to homescreen. Opt-out if an old session is found
-	if ( this.getItem('addToHome') ) {
-		this.optOut();
-	}
-
-	// critical errors:
-	if ( this.session.optedout ) {
-		this.doLog("Add to homescreen: not displaying callout because user opted out");
-		return;
-	}
-	if ( this.session.added ) {
-		this.doLog("Add to homescreen: not displaying callout because already added to the homescreen");
-		return;
-	}
-	if ( !isValidLocation ) {
-		this.doLog("Add to homescreen: not displaying callout because not a valid location");
-		return;
-	}
-
-	// check if the app is in stand alone mode
-	if ( ath.isStandalone ) {
-		// execute the onAdd event if we haven't already
-		if ( !this.session.added ) {
-			this.session.added = true;
-			this.updateSession();
-
-			if ( this.options.onAdd && ath.hasLocalStorage ) {	// double check on localstorage to avoid multiple calls to the custom event
-				this.options.onAdd.call(this);
-			}
-		}
-
-		this.doLog("Add to homescreen: not displaying callout because in standalone mode");
-		return;
-	}
-
-	// (try to) check if the page has been added to the homescreen
-	if ( this.options.detectHomescreen ) {
-		// the URL has the token, we are likely coming from the homescreen
-		if ( ath.hasToken ) {
-			_removeToken();		// we don't actually need the token anymore, we remove it to prevent redistribution
-
-			// this is called the first time the user opens the app from the homescreen
-			if ( !this.session.added ) {
-				this.session.added = true;
-				this.updateSession();
-
-				if ( this.options.onAdd && ath.hasLocalStorage ) {	// double check on localstorage to avoid multiple calls to the custom event
-					this.options.onAdd.call(this);
-				}
-			}
-
-			this.doLog("Add to homescreen: not displaying callout because URL has token, so we are likely coming from homescreen");
-			return;
-		}
-
-		// URL doesn't have the token, so add it
-		if ( this.options.detectHomescreen == 'hash' ) {
-			history.replaceState('', window.document.title, document.location.href + '#ath');
-		} else if ( this.options.detectHomescreen == 'smartURL' ) {
-			history.replaceState('', window.document.title, document.location.href.replace(/(\/)?$/, '/ath$1'));
-		} else {
-			history.replaceState('', window.document.title, document.location.href + (document.location.search ? '&' : '?' ) + 'ath=');
-		}
-	}
-
-	// check if this is a returning visitor
-	if ( !this.session.returningVisitor ) {
-		this.session.returningVisitor = true;
-		this.updateSession();
-
-		// we do not show the message if this is your first visit
-		if ( this.options.skipFirstVisit ) {
-			this.doLog("Add to homescreen: not displaying callout because skipping first visit");
-			return;
-		}
-	}
-
-	// we do no show the message in private mode
-	if ( !this.options.privateModeOverride && !ath.hasLocalStorage ) {
-		this.doLog("Add to homescreen: not displaying callout because browser is in private mode");
-		return;
-	}
-
-	// all checks passed, ready to display
-	this.ready = true;
-
-	if ( this.options.onInit ) {
-		this.options.onInit.call(this);
-	}
-
-	if ( this.options.autostart ) {
-		this.doLog("Add to homescreen: autostart displaying callout");
-		this.show();
-	}
-};
-
-ath.Class.prototype = {
-	// event type to method conversion
-	events: {
-		load: '_delayedShow',
-		error: '_delayedShow',
-		orientationchange: 'resize',
-		resize: 'resize',
-		scroll: 'resize',
-		click: 'remove',
-		touchmove: '_preventDefault',
-		transitionend: '_removeElements',
-		webkitTransitionEnd: '_removeElements',
-		MSTransitionEnd: '_removeElements'
-	},
-
-	handleEvent: function (e) {
-		var type = this.events[e.type];
-		if ( type ) {
-			this[type](e);
-		}
-	},
-
-	show: function (force) {
-		// in autostart mode wait for the document to be ready
-		if ( this.options.autostart && !_DOMReady ) {
-			setTimeout(this.show.bind(this), 50);
-			// we are not displaying callout because DOM not ready, but don't log that because
-			// it would log too frequently
-			return;
-		}
-
-		// message already on screen
-		if ( this.shown ) {
-			this.doLog("Add to homescreen: not displaying callout because already shown on screen");
-			return;
-		}
-
-		var now = Date.now();
-		var lastDisplayTime = this.session.lastDisplayTime;
-
-		if ( force !== true ) {
-			// this is needed if autostart is disabled and you programmatically call the show() method
-			if ( !this.ready ) {
-				this.doLog("Add to homescreen: not displaying callout because not ready");
-				return;
-			}
-
-			// we obey the display pace (prevent the message to popup too often)
-			if ( now - lastDisplayTime < this.options.displayPace * 60000 ) {
-				this.doLog("Add to homescreen: not displaying callout because displayed recently");
-				return;
-			}
-
-			// obey the maximum number of display count
-			if ( this.options.maxDisplayCount && this.session.displayCount >= this.options.maxDisplayCount ) {
-				this.doLog("Add to homescreen: not displaying callout because displayed too many times already");
-				return;
-			}
-		}
-
-		this.shown = true;
-
-		// increment the display count
-		this.session.lastDisplayTime = now;
-		this.session.displayCount++;
-		this.updateSession();
-
-		// try to get the highest resolution application icon
-		if ( !this.applicationIcon ) {
-			if ( ath.OS == 'ios' ) {
-				this.applicationIcon = document.querySelector('head link[rel^=apple-touch-icon][sizes="152x152"],head link[rel^=apple-touch-icon][sizes="144x144"],head link[rel^=apple-touch-icon][sizes="120x120"],head link[rel^=apple-touch-icon][sizes="114x114"],head link[rel^=apple-touch-icon]');
-			} else {
-				this.applicationIcon = document.querySelector('head link[rel^="shortcut icon"][sizes="196x196"],head link[rel^=apple-touch-icon]');
-			}
-		}
-
-		var message = '';
-
-		if ( typeof this.options.message == 'object' && ath.language in this.options.message ) {		// use custom language message
-			message = this.options.message[ath.language][ath.OS];
-		} else if ( typeof this.options.message == 'object' && ath.OS in this.options.message ) {		// use custom os message
-			message = this.options.message[ath.OS];
-		} else if ( this.options.message in ath.intl ) {				// you can force the locale
-			message = ath.intl[this.options.message][ath.OS];
-		} else if ( this.options.message !== '' ) {						// use a custom message
-			message = this.options.message;
-		} else if ( ath.OS in ath.intl[ath.language] ) {				// otherwise we use our message
-			message = ath.intl[ath.language][ath.OS];
-		}
-
-		// add the action icon
-		message = '<p>' + message.replace(/%icon(?:\[([^\]]+)\])?/gi, function(matches, group1) {
-			return '<span class="ath-action-icon">' + (!!group1 ? group1 : 'icon') + '</span>';
-		}) + '</p>';
-
-		// create the message container
-		this.viewport = document.createElement('div');
-		this.viewport.className = 'ath-viewport';
-		if ( this.options.modal ) {
-			this.viewport.className += ' ath-modal';
-		}
-		if ( this.options.mandatory ) {
-			this.viewport.className += ' ath-mandatory';
-		}
-		this.viewport.style.position = 'absolute';
-
-		// create the actual message element
-		this.element = document.createElement('div');
-		this.element.className = 'ath-container ath-' + ath.OS + ' ath-' + ath.OS + (parseInt(ath.OSVersion) || '') + ' ath-' + (ath.isTablet ? 'tablet' : 'phone');
-		this.element.style.cssText = '-webkit-transition-property:-webkit-transform,opacity;-webkit-transition-duration:0s;-webkit-transition-timing-function:ease-out;transition-property:transform,opacity;transition-duration:0s;transition-timing-function:ease-out;';
-		this.element.style.webkitTransform = 'translate3d(0,-' + window.innerHeight + 'px,0)';
-		this.element.style.transform = 'translate3d(0,-' + window.innerHeight + 'px,0)';
-
-		// add the application icon
-		if ( this.options.icon && this.applicationIcon ) {
-			this.element.className += ' ath-icon';
-			this.img = document.createElement('img');
-			this.img.className = 'ath-application-icon';
-			this.img.addEventListener('load', this, false);
-			this.img.addEventListener('error', this, false);
-
-			this.img.src = this.applicationIcon.href;
-			this.element.appendChild(this.img);
-		}
-
-		this.element.innerHTML += message;
-
-		// we are not ready to show, place the message out of sight
-		this.viewport.style.left = '-99999em';
-
-		// attach all elements to the DOM
-		this.viewport.appendChild(this.element);
-		this.container.appendChild(this.viewport);
-
-		// if we don't have to wait for an image to load, show the message right away
-		if ( this.img ) {
-			this.doLog("Add to homescreen: not displaying callout because waiting for img to load");
-		} else {
-			this._delayedShow();
-		}
-	},
-
-	_delayedShow: function (e) {
-		setTimeout(this._show.bind(this), this.options.startDelay * 1000 + 500);
-	},
-
-	_show: function () {
-		var that = this;
-
-		// update the viewport size and orientation
-		this.updateViewport();
-
-		// reposition/resize the message on orientation change
-		window.addEventListener('resize', this, false);
-		window.addEventListener('scroll', this, false);
-		window.addEventListener('orientationchange', this, false);
-
-		if ( this.options.modal ) {
-			// lock any other interaction
-			document.addEventListener('touchmove', this, true);
-		}
-
-		// Enable closing after 1 second
-		if ( !this.options.mandatory ) {
-			setTimeout(function () {
-				that.element.addEventListener('click', that, true);
-			}, 1000);
-		}
-
-		// kick the animation
-		setTimeout(function () {
-			that.element.style.webkitTransitionDuration = '1.2s';
-			that.element.style.transitionDuration = '1.2s';
-			that.element.style.webkitTransform = 'translate3d(0,0,0)';
-			that.element.style.transform = 'translate3d(0,0,0)';
-		}, 0);
-
-		// set the destroy timer
-		if ( this.options.lifespan ) {
-			this.removeTimer = setTimeout(this.remove.bind(this), this.options.lifespan * 1000);
-		}
-
-		// fire the custom onShow event
-		if ( this.options.onShow ) {
-			this.options.onShow.call(this);
-		}
-	},
-
-	remove: function () {
-		clearTimeout(this.removeTimer);
-
-		// clear up the event listeners
-		if ( this.img ) {
-			this.img.removeEventListener('load', this, false);
-			this.img.removeEventListener('error', this, false);
-		}
-
-		window.removeEventListener('resize', this, false);
-		window.removeEventListener('scroll', this, false);
-		window.removeEventListener('orientationchange', this, false);
-		document.removeEventListener('touchmove', this, true);
-		this.element.removeEventListener('click', this, true);
-
-		// remove the message element on transition end
-		this.element.addEventListener('transitionend', this, false);
-		this.element.addEventListener('webkitTransitionEnd', this, false);
-		this.element.addEventListener('MSTransitionEnd', this, false);
-
-		// start the fade out animation
-		this.element.style.webkitTransitionDuration = '0.3s';
-		this.element.style.opacity = '0';
-	},
-
-	_removeElements: function () {
-		this.element.removeEventListener('transitionend', this, false);
-		this.element.removeEventListener('webkitTransitionEnd', this, false);
-		this.element.removeEventListener('MSTransitionEnd', this, false);
-
-		// remove the message from the DOM
-		this.container.removeChild(this.viewport);
-
-		this.shown = false;
-
-		// fire the custom onRemove event
-		if ( this.options.onRemove ) {
-			this.options.onRemove.call(this);
-		}
-	},
-
-	updateViewport: function () {
-		if ( !this.shown ) {
-			return;
-		}
-
-		this.viewport.style.width = window.innerWidth + 'px';
-		this.viewport.style.height = window.innerHeight + 'px';
-		this.viewport.style.left = window.scrollX + 'px';
-		this.viewport.style.top = window.scrollY + 'px';
-
-		var clientWidth = document.documentElement.clientWidth;
-
-		this.orientation = clientWidth > document.documentElement.clientHeight ? 'landscape' : 'portrait';
-
-		var screenWidth = ath.OS == 'ios' ? this.orientation == 'portrait' ? screen.width : screen.height : screen.width;
-		this.scale = screen.width > clientWidth ? 1 : screenWidth / window.innerWidth;
-
-		this.element.style.fontSize = this.options.fontSize / this.scale + 'px';
-	},
-
-	resize: function () {
-		clearTimeout(this.resizeTimer);
-		this.resizeTimer = setTimeout(this.updateViewport.bind(this), 100);
-	},
-
-	updateSession: function () {
-		if ( ath.hasLocalStorage === false ) {
-			return;
-		}
-
-        if (localStorage) {
-            localStorage.setItem(this.options.appID, JSON.stringify(this.session));
-        }
-	},
-
-	clearSession: function () {
-		this.session = _defaultSession;
-		this.updateSession();
-	},
-
-	getItem: function(item) {
-		try {
-			if (!localStorage) {
-				throw new Error('localStorage is not defined');
-			}
-
-			return localStorage.getItem(item);
-		} catch(e) {
-			// Preventing exception for some browsers when fetching localStorage key
-			ath.hasLocalStorage = false;
-		}
-	},
-
-	optOut: function () {
-		this.session.optedout = true;
-		this.updateSession();
-	},
-
-	optIn: function () {
-		this.session.optedout = false;
-		this.updateSession();
-	},
-
-	clearDisplayCount: function () {
-		this.session.displayCount = 0;
-		this.updateSession();
-	},
-
-	_preventDefault: function (e) {
-		e.preventDefault();
-		e.stopPropagation();
-	}
-};
-
-// utility
-function _extend (target, obj) {
-	for ( var i in obj ) {
-		target[i] = obj[i];
-	}
-
-	return target;
-}
-
-function _removeToken () {
-	if ( document.location.hash == '#ath' ) {
-		history.replaceState('', window.document.title, document.location.href.split('#')[0]);
-	}
-
-	if ( _reSmartURL.test(document.location.href) ) {
-		history.replaceState('', window.document.title, document.location.href.replace(_reSmartURL, '$1'));
-	}
-
-	if ( _reQueryString.test(document.location.search) ) {
-		history.replaceState('', window.document.title, document.location.href.replace(_reQueryString, '$2'));
-	}
-}
-
-// expose to the world
-window.addToHomescreen = ath;
-
-})(window, document);

Різницю між файлами не показано, бо вона завелика
+ 0 - 1
plugins_public/cubiq-add-to-homescreen/addtohomescreen.min.js


BIN
plugins_public/cubiq-add-to-homescreen/imgs/action-icon-android.png


BIN
plugins_public/cubiq-add-to-homescreen/imgs/action-icon-ios6.png


BIN
plugins_public/cubiq-add-to-homescreen/imgs/action-icon-ios7.png


BIN
plugins_public/cubiq-add-to-homescreen/imgs/icon-152x152.png


BIN
plugins_public/cubiq-add-to-homescreen/imgs/icon-16x16.png


BIN
plugins_public/cubiq-add-to-homescreen/imgs/icon-196x196.png


+ 0 - 178
plugins_public/cubiq-add-to-homescreen/imgs/icon.svg

@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:xlink="http://www.w3.org/1999/xlink"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="300"
-   height="300"
-   id="svg2"
-   version="1.1"
-   inkscape:version="0.48+devel r13193 custom"
-   viewBox="0 0 300 300"
-   sodipodi:docname="icon.svg"
-   inkscape:export-filename="/home/matteo/Sites/add-to-homescreen/imgs/icon-152x152.png"
-   inkscape:export-xdpi="58.799999"
-   inkscape:export-ydpi="58.799999">
-  <defs
-     id="defs4">
-    <linearGradient
-       inkscape:collect="always"
-       id="linearGradient4091">
-      <stop
-         style="stop-color:#224e04;stop-opacity:1;"
-         offset="0"
-         id="stop4093" />
-      <stop
-         style="stop-color:#4fb409;stop-opacity:1"
-         offset="1"
-         id="stop4095" />
-    </linearGradient>
-    <linearGradient
-       inkscape:collect="always"
-       id="linearGradient4117">
-      <stop
-         style="stop-color:#3a8b02;stop-opacity:1"
-         offset="0"
-         id="stop4119" />
-      <stop
-         style="stop-color:#a9f608;stop-opacity:1"
-         offset="1"
-         id="stop4121" />
-    </linearGradient>
-    <linearGradient
-       inkscape:collect="always"
-       id="linearGradient4064">
-      <stop
-         style="stop-color:#eeeeee;stop-opacity:1"
-         offset="0"
-         id="stop4066" />
-      <stop
-         style="stop-color:#f9f9f9;stop-opacity:1"
-         offset="1"
-         id="stop4068" />
-    </linearGradient>
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient4064"
-       id="linearGradient4070"
-       x1="447.85715"
-       y1="515.2193"
-       x2="447.85715"
-       y2="220.2193"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="translate(-230.7143,-185.71425)" />
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient4117"
-       id="linearGradient4123"
-       x1="444.99994"
-       y1="498.53314"
-       x2="398.56287"
-       y2="260.25818"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="matrix(0.93059911,0,0,0.93102148,-202.5138,-200.62118)" />
-    <linearGradient
-       inkscape:collect="always"
-       xlink:href="#linearGradient4091"
-       id="linearGradient4097"
-       x1="195.00041"
-       y1="303.00513"
-       x2="191.42899"
-       y2="208.71939"
-       gradientUnits="userSpaceOnUse"
-       gradientTransform="translate(0,-10)" />
-  </defs>
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="0.7"
-     inkscape:cx="106.40376"
-     inkscape:cy="260.41876"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     inkscape:window-width="1345"
-     inkscape:window-height="1080"
-     inkscape:window-x="534"
-     inkscape:window-y="99"
-     inkscape:window-maximized="0"
-     fit-margin-top="0"
-     fit-margin-left="0"
-     fit-margin-right="0"
-     fit-margin-bottom="0" />
-  <metadata
-     id="metadata7">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(-40.000004,-32.362198)">
-    <rect
-       style="color:#000000;color-interpolation:sRGB;color-interpolation-filters:linearRGB;fill:url(#linearGradient4070);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;paint-order:normal;marker:none;visibility:visible;display:inline;overflow:visible;isolation:auto;mix-blend-mode:normal;enable-background:accumulate;clip-rule:nonzero;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto"
-       id="rect3262"
-       width="300"
-       height="300"
-       x="39.999996"
-       y="32.362198"
-       rx="0"
-       ry="0" />
-    <path
-       sodipodi:type="inkscape:offset"
-       inkscape:radius="8.4488764"
-       inkscape:original="M 90.625 95.578125 C 87.310736 95.578125 84.642578 98.248686 84.642578 101.56445 L 84.642578 263.16211 C 84.642578 266.47788 87.310736 269.14844 90.625 269.14844 L 150.49414 269.14844 L 190 316.85938 L 229.50391 269.14844 L 289.375 269.14844 C 292.68925 269.14844 295.35742 266.47788 295.35742 263.16211 L 295.35742 101.56445 C 295.35742 98.248686 292.68925 95.578125 289.375 95.578125 L 90.625 95.578125 z "
-       style="color:#000000;color-interpolation:sRGB;color-interpolation-filters:linearRGB;fill:#000000;fill-opacity:0.18232045;fill-rule:nonzero;stroke:none;stroke-width:2;paint-order:normal;marker:none;visibility:visible;display:inline;overflow:visible;isolation:auto;mix-blend-mode:normal;enable-background:accumulate;clip-rule:nonzero;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto"
-       id="path4101"
-       d="m 90.625,87.128906 c -7.852876,0 -14.431641,6.587306 -14.431641,14.435544 l 0,161.59766 c 0,7.84824 6.578766,14.43555 14.431641,14.43555 l 55.89648,0 36.97071,44.65039 a 8.4497213,8.4497213 0 0 0 13.01562,0 l 36.96875,-44.65039 55.89844,0 c 7.85288,0 14.43164,-6.58729 14.43164,-14.43555 l 0,-161.59766 c 0,-7.848258 -6.57876,-14.435544 -14.43164,-14.435544 l -198.75,0 z"
-       transform="translate(0,-10)" />
-    <path
-       sodipodi:nodetypes="sssscccsssss"
-       inkscape:connector-curvature="0"
-       id="path3278"
-       d="m 90.624913,85.578761 c -3.314264,0 -5.98164,2.670412 -5.98164,5.986179 l 0,161.59769 c 0,3.31577 2.667376,5.98618 5.98164,5.98618 l 59.869147,0 39.50503,47.71121 39.50502,-47.71121 59.87097,0 c 3.31425,0 5.98164,-2.67041 5.98164,-5.98618 l 0,-161.59769 c 0,-3.315767 -2.66739,-5.986179 -5.98164,-5.986179 z"
-       style="color:#000000;color-interpolation:sRGB;color-interpolation-filters:linearRGB;fill:url(#linearGradient4097);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;paint-order:normal;marker:none;visibility:visible;display:inline;overflow:visible;isolation:auto;mix-blend-mode:normal;enable-background:accumulate;clip-rule:nonzero;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto" />
-    <path
-       style="color:#000000;color-interpolation:sRGB;color-interpolation-filters:linearRGB;fill:url(#linearGradient4123);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;paint-order:normal;marker:none;visibility:visible;display:inline;overflow:visible;isolation:auto;mix-blend-mode:normal;enable-background:accumulate;clip-rule:nonzero;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto"
-       d="m 90.624913,69.578761 c -3.314264,0 -5.98164,2.670412 -5.98164,5.98618 l 0,161.597689 c 0,3.31577 2.667376,5.98618 5.98164,5.98618 l 59.869147,0 39.50503,45.71121 39.50502,-45.71121 59.87097,0 c 3.31425,0 5.98164,-2.67041 5.98164,-5.98618 l 0,-161.597689 c 0,-3.315768 -2.66739,-5.98618 -5.98164,-5.98618 z"
-       id="rect4115"
-       inkscape:connector-curvature="0"
-       sodipodi:nodetypes="sssscccsssss" />
-    <path
-       sodipodi:nodetypes="caacssccccssssccccsccac"
-       inkscape:connector-curvature="0"
-       d="m 189.07976,109.00002 c -0.43511,-0.29358 -0.91236,-0.65348 -1.43694,-0.64269 -0.53484,0.009 -0.99987,0.40641 -1.43692,0.71499 -18.8181,13.28539 -49.72205,47.99818 -49.72205,47.99818 -0.40256,0.36834 -0.65657,0.90249 -0.65657,1.49139 0,1.12777 0.91323,2.03724 2.03733,2.03724 l 14.00338,0 0,9.63181 0,43.41485 23.62296,0 0,-30.85169 c 0,-1.14319 0.92488,-2.07262 2.06663,-2.07262 l 20.13596,0 c 1.14551,0 2.07347,0.92943 2.07347,2.07262 l 0,30.85784 23.64379,0 0,-43.41559 0,-9.69731 14.00332,-0.009 c 1.13249,-6.3e-4 2.0443,-0.91099 2.0443,-2.0372 0,-0.59191 -0.254,-1.12313 -0.45529,-1.30781 0,0 -30.8359,-35.28952 -49.92333,-48.18598 z"
-       id="path4250"
-       style="fill:#50a003;fill-opacity:1;stroke:none;display:inline;enable-background:new" />
-    <path
-       style="fill:#ffffff;fill-opacity:1;stroke:none;display:inline;enable-background:new"
-       id="path22042"
-       d="m 191.4369,110.91614 c -0.43511,-0.29357 -0.91236,-0.65348 -1.43694,-0.64269 -0.53484,0.009 -0.99987,0.4064 -1.43692,0.71498 -18.8181,13.28539 -49.72205,47.99819 -49.72205,47.99819 -0.40256,0.36834 -0.65657,0.90249 -0.65657,1.49138 0,1.12777 0.91323,2.03725 2.03733,2.03725 l 14.00338,0 0,9.63181 0,43.41485 23.62296,0 0,-30.85169 c 0,-1.14319 0.92488,-2.07262 2.06663,-2.07262 l 20.13596,0 c 1.14551,0 2.07347,0.92943 2.07347,2.07262 l 0,30.85784 23.64379,0 0,-43.41559 0,-9.69731 14.00332,-0.009 c 1.13249,-6.3e-4 2.0443,-0.91099 2.0443,-2.0372 0,-0.59191 -0.254,-1.12314 -0.45529,-1.30781 0,0 -30.8359,-35.28953 -49.92333,-48.18599 z"
-       inkscape:connector-curvature="0"
-       sodipodi:nodetypes="caacssccccssssccccsccac" />
-    <path
-       style="color:#000000;color-interpolation:sRGB;color-interpolation-filters:linearRGB;fill:#ffffff;fill-opacity:0.72375692;fill-rule:nonzero;stroke:none;stroke-width:2;paint-order:normal;marker:none;visibility:visible;display:inline;overflow:visible;isolation:auto;mix-blend-mode:normal;enable-background:accumulate;clip-rule:nonzero;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto"
-       d="m 302.99805,86.914932 c 0.5146,1.466542 0.80859,3.029317 0.80859,4.650391 l 0,161.597657 c 0,7.84826 -6.57876,14.43555 -14.43164,14.43555 l -55.89844,0 -36.96875,44.65039 a 8.4497213,8.4497213 0 0 1 -13.01562,0 l -36.97071,-44.65039 -55.896476,0 c -3.670545,0 -7.050931,-1.4527 -9.623047,-3.78711 1.976796,5.63356 7.3922,9.78711 13.623047,9.78711 l 55.896476,0 36.97071,44.65039 a 8.4497213,8.4497213 0 0 0 13.01562,0 l 36.96875,-44.65039 55.89844,0 c 7.85288,0 14.43164,-6.58729 14.43164,-14.43555 l 0,-161.59766 c 0,-4.17987 -1.87785,-7.990489 -4.80859,-10.650388 z"
-       id="path4108"
-       inkscape:connector-curvature="0" />
-  </g>
-</svg>

Різницю між файлами не показано, бо вона завелика
+ 0 - 153
plugins_public/cubiq-add-to-homescreen/style/addtohomescreen.css


+ 0 - 3
splash.php

@@ -36,9 +36,6 @@ function getPageMainCode()
     	'login_form' => $sLoginForm,
         'login_form_in_box' => DesignBoxContent(_t('_sys_txt_splash_login'), $sLoginForm, BX_DB_PADDING_DEF)
     ));
-
-    if (getParam('add_to_mobile_homepage') == 'on')
-        $s .= BxDolService::call('system', 'add_to_mobile_homepage', array(), 'TemplServices');
         
     return $s;
 }

+ 1 - 2
template/scripts/BxBasePageHome.php

@@ -45,8 +45,7 @@ class BxBasePageHome extends BxTemplPage
         $s = parent::getCode ();
         if (isAdmin() && getParam('site_tour_home') == 'on')
             $s .= $this->_oTemplate->parseHtmlByName('homepage_tour.html', array('tour_theme' => $this->_sTourTheme));
-        if (getParam('add_to_mobile_homepage') == 'on')
-            $s .= BxDolService::call('system', 'add_to_mobile_homepage', array(), 'TemplServices');
+
         return $s;
     }
 

+ 0 - 11
template/scripts/BxBaseServices.php

@@ -345,17 +345,6 @@ class BxBaseServices extends BxDol implements iBxDolProfileService
 
     }
 
-    /**
-     * This service adds notification for users which open your site on mobile devices
-     * and suggest to add your site to their mobile homepage.
-     */ 
-    public function serviceAddToMobileHomepage ()
-    {
-        BxDolTemplate::getInstance()->addJs('cubiq-add-to-homescreen/addtohomescreen.min.js');
-        BxDolTemplate::getInstance()->addCss(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'cubiq-add-to-homescreen/style/|addtohomescreen.css');
-        return "<script>addToHomescreen();</script>";
-    }
-
     public function serviceGetOptionsProfileBot()
     {
         $aResult = array(

Деякі файли не було показано, через те що забагато файлів було змінено