- Skip to navigation
- Skip to main content
- Skip to related content
News
News
- Latest
- Sydney
- Melbourne
- Brisbane
- Adelaide
- Perth
- World
- Environment
Lifestyle
Lifestyle
- Shopping
- Sex and Relationships
- Royals
- Style
- Watch
- Horoscopes
- Celebrity
- TV
- Movies
Finance
Finance
- My portfolio
- Watchlists
- Markets
- Money News
- Personal finance
- Cryptocurrencies
- Industries
Sports
Sports
- Fantasy
- NRL
- AFL
- Tennis
- Football
- Rugby
- Cricket
- Motorsport
- NBA
- NFL
- Golf
- MMA
- Terms
- Privacy
- Privacy dashboard
- Feedback
© 2024 All rights reserved.
About our ads Advertising Jobs
Sign in
- Fantasy Home
- News
- Finance
- Sport
- Lifestyle
- Entertainment
- Weather
- Shopping
- More...
':"";if(i){var a=n.promos.showYahooLogo?"":"yns-no-logo";i=i.replace("{notifOnboardBtnLabel}",n.promos.notifOnboardBtnLabel).replace("{notifOnboardMsg}",n.promos.notifOnboardMsg).replace("{subscriptionTopic}",n.promos.subscriptionTopic).replace("{noLogoClass}",a).replace("{promoLogo}",n.promos.promoLogo)}var s=t.newCount>n.panel.maxCount?t.newCount:"",c=n.panel.notificationCenterPath,l=c?"":B,u=n.panel.headerMsg?"":" "+B,d=c?D:"",p=void 0;t.count?p=t.markup:p='
{emptyPanelMsg}
'.replace("{emptyPanelMsg}",n.panel.emptyPanelMsg);return e=e.replace("{notifMarkup}",p).replace("{promoMarkup}",i).replace("{hideClass}",l).replace("{notifCenterLink}",c).replace("{paddingClass}",d).replace("{headerMsg}",n.panel.headerMsg).replace("{hideHeaderClass}",u).replace(/{notificationCenterNavMsg}/g,n.panel.notificationCenterNavMsg).replace(/{newCount}/g,s)}},{key:"render",value:function(e,t){var n=this;if(n._panelNode){var o=void 0,r=n._panelNode,i=void 0,a=void 0;switch(e){case"expanded_panel":o='
{headerMsg}
- {promoMarkup}{notifMarkup}
{notificationCenterNavMsg}
',a=n._store.getNotifications(),i=n._generatePanelMarkup(o,a),r.innerHTML=i;break;case"error_panel":i=(o='
{errorMsg}
').replace("{errorMsg}",n._config.panel.errorMsg),r.innerHTML=i}t&&t()}else t&&t(new Error("No panel parent"))}},{key:"createPanelParentNode",value:function(e){e&&(e.innerHTML='
',this._panelNode=document.getElementById(R))}},{key:"updateBadgeNode",value:function(e){if(e){var t=this._store.getNotifications().newCount,n=this._config.badge.maxCount;if(t){var o=t>n?n+"+":t;e.innerHTML=o}else e.innerHTML=""}}},{key:"addStyles",value:function(e){if(e&&"undefined"!=typeof window){var t=document.getElementById(this._config.panel.styleTagId);t||((t=document.createElement("style")).type="text/css",t.id=this._config.panel.styleTagId,t.innerText=e,document.head.appendChild(t))}}}]),e}(),j=function(){function e(t,n,o){E(this,e);var r=this;r._store=n,r._view=o,r._config=t;var i=r._config.panel;r._panelParentNode=document.querySelector(i.parentSelector),r._badgeNode=r._config.badge.selector&&document.querySelector(r._config.badge.selector),r._indicatorNode=i.indicatorSelector&&document.querySelector(i.indicatorSelector)}return L(e,[{key:"createPanelParentNode",value:function(){this._view.createPanelParentNode(this._panelParentNode),this._notifPanelNode=document.getElementById(R)}},{key:"refreshPanelNode",value:function(e,t){var n=this;A(n._notifPanelNode,P),n._store.fetchNotifications(e,(function(e,o){var r=window.wafer&&window.wafer.base;r&&r.destroy(n._notifPanelNode),e?n._notifPanelNode.innerHTML||(n._view.render("error_panel"),A(n._notifPanelNode,P)):(n._view.render("expanded_panel"),n._view.updateBadgeNode(n._badgeNode),n._showBadge(),n._showIndicator(),n._view.addStyles(o.css)),N(n._notifPanelNode,P),r&&r.sync(n._notifPanelNode.parentNode),t&&t(e,o)}))}},{key:"resetBadge",value:function(){var e=this;e._store.resetNewCount(),e._view.updateBadgeNode(e._badgeNode),A(e._badgeNode,e._config.badge.hideClass)}},{key:"_showIndicator",value:function(){this._indicatorNode&&(this._store.getNotifications().newCount?A(this._indicatorNode,this._config.panel.indicatorClass):N(this._indicatorNode,this._config.panel.indicatorClass))}},{key:"_showBadge",value:function(){var e=this;e._store.getNotifications().newCount?N(e._badgeNode,e._config.badge.hideClass):A(e._badgeNode,e._config.badge.hideClass)}}]),e}(),z={promos:{eligibleBodyClass:"display-push-promos",enableNotifOnboard:!0,bypassEligibleClassCheck:!1,notifOnboardBtnLabel:"Notify Me",notifOnboardMsg:"Get alerts for breaking news and top stories",promoLogo:"https://s.yimg.com/cv/apiv2/ae/news/circle_bell.png",showYahooLogo:!0,subscriptionTopic:"gondor_homerun_news"},badge:{hideClass:"",maxCount:5,selector:""},panel:{emptyPanelMsg:"You have no new notifications.",errorMsg:"",headerMsg:"Notifications",imageTag:"img:40x40|2|80",indicatorClass:"yns-indicator",indicatorSelector:null,maxCount:6,notificationCenterNavMsg:"View all {newCount} notifications",notificationCenterPath:"",notificationTypes:"",parentSelector:null,styleTagId:"notificationStyles",theme:"default"},service:{attemptCount:1,attemptDelay:2,url:null,resetUrl:null,isRMP:!1,responseType:"json",timeout:1500}},H=function(){function e(t){E(this,e);var n=this;n.config=n._parseConfig(t),n._validateRequiredConfigs()&&(n._request=new k(n.config),n._store=new T(n.config,n._request),n._view=new q(n.config,n._store),n._panelController=new j(n.config,n._store,n._view),n._panelController.createPanelParentNode(),n._assignHelperMethods())}return L(e,[{key:"_parseConfig",value:function(e){var t={};for(var n in I(t,z),t)if(t.hasOwnProperty(n)){var o=t[n],r=e[n];"object"===(void 0===o?"undefined":S(o))?I(o,r):t[n]=e[n]}return t}},{key:"_validateRequiredConfigs",value:function(){var e=this.config;return!(!e.panel.parentSelector||!e.service.url)}},{key:"_assignHelperMethods",value:function(){var e=this;e.helpers={refreshPanelNode:e._panelController.refreshPanelNode.bind(e._panelController),resetBadge:e._panelController.resetBadge.bind(e._panelController),resetIndicator:function(){N(e._panelController._indicatorNode,e.config.panel.indicatorClass)}}}}]),e}(),U={NotificationClient:H},F="lnct",Y=function(){function e(){var e,t;this.personalized=!1,this.ybarElem=document.getElementById("ybar"),this.partnerClasses=null===(t=null===(e=this.ybarElem)||void 0===e?void 0:e.className)||void 0===t?void 0:t.match(/ybar-variant-([a-z]*)/),this.client=new U.NotificationClient(this.getConfig())}return e.prototype.refreshPanel=function(){var e,t,n,o=this,r={lastUpdate:this.getTimeStamp()||this.setTimeStamp(),loadInHpViewer:!0,includePersonalized:this.personalized},i=(null===(e=window.YAHOO)||void 0===e?void 0:e.context)||(null===(t=window.Af)||void 0===t?void 0:t.context)||{};return i.region&&i.lang&&(r.lang=i.lang,r.region=i.region),(null===(n=this.partnerClasses)||void 0===n?void 0:n.length)&&(r.partner=this.partnerClasses[1]),new Promise((function(e,t){o.client.helpers.refreshPanelNode({matrixParams:r},(function(n,o){n&&(c("Notification refresh error:",n),t(n)),e(o)}))}))},e.prototype.resetBadge=function(){this.client.helpers.resetBadge(),this.setTimeStamp()},e.prototype.getConfig=function(){var e,t,n,o,r,i=document.getElementById("notification-container"),a=null===(e=null==i?void 0:i.dataset)||void 0===e?void 0:e.config;if(O&&!a)return O;var s={promos:{eligibleBodyClass:"display-push-promos",enableNotifOnboard:!0},badge:{selector:"#notif-badge",hideClass:"ybar-notification-hidden"},panel:{emptyPanelMsg:"You have no new notifications.",errorMsg:"Please check back later.",headerMsg:"Notifications",maxCount:5,parentSelector:"#ybarNotificationBody",notificationTypes:"breakingNews"},service:{url:"/tdv2_fp/api/resource/NotificationHistory.getHistory",isRMP:!1}},l={};if(a){"att"===(null===(t=this.partnerClasses)||void 0===t?void 0:t[1])&&(s.promos.showYahooLogo=!1);try{var u=JSON.parse(a);l=v({},u),this.personalized=1===u.personalize}catch(e){c("Notifications config parsing error",e)}i&&delete i.dataset.config}return O=this.mergeConfigs(s,l),(null===(n=this.partnerClasses)||void 0===n?void 0:n.length)&&"yahoo"!==(null===(o=this.partnerClasses)||void 0===o?void 0:o[1])&&(null===(r=O.promos)||void 0===r?void 0:r.subscriptionTopic)&&delete O.promos.subscriptionTopic,O},e.prototype.mergeConfigs=function(e,t){var n=v({},e);for(var o in e)n[o]=v(v({},e[o]),t[o]);return n},e.prototype.getTimeStamp=function(){var e;return null===(e=window.localStorage)||void 0===e?void 0:e.getItem(F)},e.prototype.setTimeStamp=function(){var e,t=""+Math.floor((new Date).getTime()/1e3);return null===(e=window.localStorage)||void 0===e||e.setItem(F,t),t},e}();new Y;var V,G,W="",$=[],J=function(){},K=function(){window.removeEventListener("beforeunload",K),""!==W&&c("Rapid not found on page",new Error(W))},X=null,Z=function(){return null===X&&(X=document.getElementById("ybar")),X},Q=function(){var e=0,t=window.YAHOO;if(V)return V;if(t)if(t.i13n)if(t.i13n.__RAPID_INSTANCES__)if(t.i13n.__RAPID_INSTANCES__.length<1)W="YBAR: no instances of rapid found!";else{var n=function(e){var t=void 0;if(e&&e.length>0)for(var n=0;n
\n
\n
\n
\n
\n
\n
\n
'.concat(e.i18n.t("search.voice.permission_title"),'
\n
').concat(e.i18n.t("search.voice.permission_text"),"
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n \n \n \n \n
\n
\n
\n \n \n '.concat(e.i18n.t("search.voice.recognition_retry"),'\n
\n
\n
\n
\n
\n
\n ').concat(e.i18n.t("search.voice.trending_title"),'\n \n
\n
\n