‘; // check if i am on FrontPage if (window.location.href.indexOf (“. htm”) === -1) {if ($ (“.desktopNotification__banner”). length === 0) $ (“# . header “) append (html content); ..} $ (“.desktopNotification__banner”) Parent () css ({“clear”: “both”}); . $ (“.desktopNotification__banner”) Css ({“display”, “block”}); . $ (“.desktopNotification__banner__Btn__Close”) One (“click”, function () {document.cookie = “desktopNotification = false”; $ (“.desktopNotification__banner”) css ({“display”: “none”});.} ); var myC = document.cookie; . if (myC.indexOf (“desktopNotification =”) & gt; -1) {$ (“.desktopNotification__banner”) css ({“display”: “none”}); } If (window.Notification & amp; & amp; window.Notification.permission === “granted”) {$ (“.desktopNotification__banner”) css ({“display”: “none”.}); }} Function highlightNotificationButton () {. $ (“.desktopNotification__btn__check”) One (“click”, function () {Notification.requestPermission (function () {checkPermission ();});}); checkPermission (); } Function checkDependencies () {if (typeof console === ‘undefined’) {console = {log: function () {}}; } // Used for tracking if (typeof gtmDataLayer === ‘undefined’) {gtmDataLayer = []; }} Function requestNewArticlesWithIntervall () {setInterval (function () {requestLatestArticles ();}, cfg.requestIntervall); } Function Hasper mission () {if (Notification.permission === “granted”) {return true; } Else {return false; }} Function askPermission () {if (cfg.addPermissionButton === true) {$ (“body”) append (‘. “); $ (Document) .on (“click”, “#askNotificationPermission”, function () {Notification.requestPermission (); $ (“#askNotificationPermission”) hide ();.}); } If (cfg.askPermissionOnLoad === true) {Notification.requestPermission (); }} Function sendNotification (articlelist) {for (var i = 0; i 0) {sendNotification (diffNewArticles); diffNewArticles = []; .}}} Function addButtonHandler () {$ (“#requestPermission”) one (“click”, function () {Notification.requestPermission ();}); . $ (“#checkPermission”) One (“click”, function () {if (Notification.permission) {// Firefox $ (“#result”) val (Notification.permission).} Else {// Chrome $ . (“#result”) val (New Notification (“check”) permission.);}}); . $ (“#show”) One (“click”, function () {sendNotification ();}); } Function checkPermission () {if {$ (“.desktopNotification__btn__check”) html (“Your browser does not support notifications”) (window.Notification!). $ (“.desktopNotification__btn__check”) AddClass (“desktopNotification__btn__check-denied”) return. } If (Notification.permission === “granted”) {$ (“.desktopNotification__btn__check”) html (“Notifications are already turned on.”); $ (“.desktopNotification__btn__check”) AddClass (“desktopNotification__btn__check – granted.”); .} If (Notification.permission === “denied”) {$ (“.desktopNotification__btn__check”) html (“Notifications are disabled”); $ (“.desktopNotification__btn__check”) AddClass (“desktopNotification__btn__check – denied.”); }} Var methods = {init: function () {init (); }, AddNotificationBanner: function () {addNotificationBanner (); }, SendNotification: function (articlelist) {sendNotification (articlelist); }, RequestLatestArticles: function () {requestLatestArticles (); }} Return methods; }) (jQuery); $ (Function () {$ (document) .ready (function () {desktopPushNotification = desktopPushNotificationNew; if (window.featureToggler & amp; & amp; window.featureToggler.desktopPushNotification === true) {desktopPushNotification.addNotificationBanner ();} desktopPushNotification. init ();});});
‘; // check if i am on FrontPage if (window.location.href.indexOf (“. htm”) === -1) {if ($ (“.desktopNotification__banner”). length === 0) $ (“# . header “) append (html content); ..} $ (“.desktopNotification__banner”) Parent () css ({“clear”: “both”}); . $ (“.desktopNotification__banner”) Css ({“display”, “block”}); . $ (“.desktopNotification__banner__Btn__Close”) One (“click”, function () {document.cookie = “desktopNotification = false”; $ (“.desktopNotification__banner”) css ({“display”: “none”});.} ); var myC = document.cookie; . if (myC.indexOf (“desktopNotification =”) & gt; -1) {$ (“.desktopNotification__banner”) css ({“display”: “none”}); } If (window.Notification & amp; & amp; window.Notification.permission === “granted”) {$ (“.desktopNotification__banner”) css ({“display”: “none”.}); }} Function highlightNotificationButton () {. $ (“.desktopNotification__btn__check”) One (“click”, function () {Notification.requestPermission (function () {checkPermission ();});}); checkPermission (); } Function checkDependencies () {if (typeof console === ‘undefined’) {console = {log: function () {}}; } // Used for tracking if (typeof gtmDataLayer === ‘undefined’) {gtmDataLayer = []; }} Function requestNewArticlesWithIntervall () {setInterval (function () {requestLatestArticles ();}, cfg.requestIntervall); } Function Hasper mission () {if (Notification.permission === “granted”) {return true; } Else {return false; }} Function askPermission () {if (cfg.addPermissionButton === true) {$ (“body”) append (‘. “); $ (Document) .on (“click”, “#askNotificationPermission”, function () {Notification.requestPermission (); $ (“#askNotificationPermission”) hide ();.}); } If (cfg.askPermissionOnLoad === true) {Notification.requestPermission (); }} Function sendNotification (articlelist) {for (var i = 0; i 0) {sendNotification (diffNewArticles); diffNewArticles = []; .}}} Function addButtonHandler () {$ (“#requestPermission”) one (“click”, function () {Notification.requestPermission ();}); . $ (“#checkPermission”) One (“click”, function () {if (Notification.permission) {// Firefox $ (“#result”) val (Notification.permission).} Else {// Chrome $ . (“#result”) val (New Notification (“check”) permission.);}}); . $ (“#show”) One (“click”, function () {sendNotification ();}); } Function checkPermission () {if {$ (“.desktopNotification__btn__check”) html (“Your browser does not support notifications”) (window.Notification!). $ (“.desktopNotification__btn__check”) AddClass (“desktopNotification__btn__check-denied”) return. } If (Notification.permission === “granted”) {$ (“.desktopNotification__btn__check”) html (“Notifications are already turned on.”); $ (“.desktopNotification__btn__check”) AddClass (“desktopNotification__btn__check – granted.”); .} If (Notification.permission === “denied”) {$ (“.desktopNotification__btn__check”) html (“Notifications are disabled”); $ (“.desktopNotification__btn__check”) AddClass (“desktopNotification__btn__check – denied.”); }} Var methods = {init: function () {init (); }, AddNotificationBanner: function () {addNotificationBanner (); }, SendNotification: function (articlelist) {sendNotification (articlelist); }, RequestLatestArticles: function () {requestLatestArticles (); }} Return methods; }) (jQuery); $ (Function () {$ (document) .ready (function () {desktopPushNotification = desktopPushNotificationNew; if (window.featureToggler & amp; & amp; window.featureToggler.desktopPushNotification === true) {desktopPushNotification.addNotificationBanner ();} desktopPushNotification. init ();});});
Recommend this article by e-mail
<- audio id:.! sorry! no ->
“31.366610738255″
No comments:
Post a Comment