<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
	<title>
	The Weekly Gripe - Have your say on the original Gripe Site	</title>

	<meta name=viewport content="width=device-width, initial-scale=1">
	<meta name="author" content="The Weekly Gripe">
	<meta property="og:title" content="The Weekly Gripe - Have your say on the original Gripe Site">
	<meta name="twitter:title" content="The Weekly Gripe - Have your say on the original Gripe Site">
	<meta name="description" content="">
	<meta property="og:description" content="">
	<meta name="twitter:description" content="">
		
	<link rel="stylesheet" href="/css/main4.css">  	
	<!-- Global site tag (gtag.js) - Google Analytics -->
	<script async src="https://www.googletagmanager.com/gtag/js?id=UA-688546-1"></script>
	<!-- The core Firebase JS SDK is always required and must be listed first -->
	<script  src="https://www.gstatic.com/firebasejs/8.2.0/firebase-app.js"></script>
	<script  src="https://www.gstatic.com/firebasejs/8.2.0/firebase-messaging.js"></script>
	<script  src="https://www.gstatic.com/firebasejs/8.2.0/firebase-analytics.js"></script>
	<script>
		window.dataLayer = window.dataLayer || [];
		function gtag(){dataLayer.push(arguments);}
		gtag('js', new Date());
		gtag('config', 'UA-688546-1');
	</script>
	<script async src='https://www.google.com/recaptcha/api.js'></script>
	<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
	<script>
	// Google ads
    (adsbygoogle = window.adsbygoogle || []).push({
     google_ad_client: "ca-pub-7787672720928246",
     enable_page_level_ads: true,
     overlays: {bottom: true}
    });
	// Initialize Firebase	
	
	var firebaseConfig = {
		apiKey: "AIzaSyDmhfIpcyHDbcrwi8AWMoMAygizBZbgoCc",
		authDomain: "wg-notifications-df2e8.firebaseapp.com",
		projectId: "wg-notifications-df2e8",
		storageBucket: "wg-notifications-df2e8.appspot.com",
		messagingSenderId: "696586675556",
		appId: "1:696586675556:web:0000b06cef527c431a8671",
		measurementId: "G-R2E9WP696R"
	};	
	firebase.initializeApp(firebaseConfig);
	firebase.analytics();
	const messaging = firebase.messaging();
	</script>
	<style>
	.bell {
		height: 1.0em; 
		width auto;
		vertical-align:text-bottom;
		padding-left:0.3em;
		visibility:hidden;
		}
		
	.notify_check {
		transform: scale(1.5);
	}
	</style>
</head>
<body>
	<div id="container">

	<div class="grid grid--no-gutter">
		<span id="fixedbit">
		<div class="grid__col grid__col--5-of-5" id="site-title">
			<a href="/"><img src="/Images/weekly-gripe.png" alt="The Weekly Gripe" title="The Weekly Gripe"/></a>		</div>
		<div>
			<nav class="topnav grid grid--no-gutter">
			<img id="hamburger" class="grid__col grid__col--4-of-5" src="Images/hamburgermenu.png" alt="Menu"/> 
			<ul id="menu" class="grid__col grid__col--4-of-5">
				<li><a href="/">Home</a></li>	
				<li><a href="/your-gripe">Your Gripe</a></li>	
				<li><a href="/get-on-the-soapbox">Soapbox</a></li>
				<li><a href="/browse-gripes">Browse</a></li>	
				<li><a href="/recent-comments-from-visitors">Comments</a></li>	
				<li><a href="/about-the-weekly-gripe">About</a></li>	
				<li><a href="/notifications">Notifications</a> <img src="/Images/bell_off.png" class="bell"/></li>	
			</ul>
			<div id="searchbox" class="grid__col grid__col--1-of-5 grid__col--am">
				<input type="search" id="searchfield" name="searchfield" placeholder="Search for a gripe"/>
			</div>
			</nav>	
		</div>	
		<ul id="slide-menu" >
			<li><a href="/">Home</a></li>	
			<li><a href="/gripe-the-news">News Gripes</a></li>	
			<li><a href="/your-gripe">Your Gripe</a></li>	
			<li><a href="/get-on-the-soapbox">Soapbox</a></li>
			<li><a href="/browse-gripes">Browse</a></li>	
			<li><a href="/recent-comments-from-visitors">Comments</a></li>	
			<li><a href="/about-the-weekly-gripe">About</a></li>	
			<li><a href="/notifications">Notifications  <img src="/Images/bell_off.png" class="bell"/></a></li>	
		</ul>
		</span>
		<div class="grid__col grid__col--1-of-5" id="leftbar">	

      <div id="features">
        <br/>
				<a href="gripe-the-news"><img src="Images/gripe-news.jpg" alt="Gripes the News"/></a>
				<br/>
				<a href="get-on-the-soapbox"><img src="Images/soapbox.jpg" alt="The Soapbox"/></a>
				<br/>
				<a href="gripes-in-the-pipes"><img src="Images/gripes-pipes.jpg" alt="Gripes in the pipes"/></a>
			</div>
			<div id="adsense3">
				<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
				<!-- 2015ResponsiveAd3 -->
				<ins class="adsbygoogle"
				    style="display:block"
					data-full-width-responsive="true"
     				data-ad-client="ca-pub-7787672720928246"
     				data-ad-slot="2639828690"
					data-ad-format="auto"></ins>
				<script>
					(adsbygoogle = window.adsbygoogle || []).push({});
				</script>
			</div>

      <!-- <div class="addthis_sharing_toolbox addthis1"></div> -->

			
		</div>		
		<div class="grid__col grid__col--3-of-5" >
			<img src="/Images/weekly-gripe.png" alt="*" title="*" id="padder"/>
			<div id="results"></div>
			<header>			
			<h1 id="page-title"></h1>
        
        <!-- mobile ad unit -->
        <style type="text/css">
          .adslot_1 { display:inline-block; width: 320px; height: 50px; }
            @media (max-width: 400px) { .adslot_1 { display: none; } }
          @media (min-width:500px) { .adslot_1 { width: 468px; height: 60px; } }
          @media (min-width:800px) { .adslot_1 { width: 686px; height: 90px; } }
          </style>    
				<!-- 2015ResponsiveAd3 -->
        <div style="text-align:center;">
				<ins class="adsbygoogle adslot_1"
				    style="display: inline-block"
     				data-ad-client="ca-pub-7787672720928246"
     				data-ad-slot="2639828690">
        </ins>
        <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
        <script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
        </div>
      </header>
			<article id="main">
				<p>
	
</p>
<p class="cat-entry"><img class="cat-thumb" src="https://res.cloudinary.com/the-weekly-gripe/image/fetch/https://www.weeklygripe.co.uk/AImg/weepics/a1315.jpg" alt="The Bad People Are In Control" /><a href="bad-people-in-control">The Bad People Are In Control</a><span class="cat-text"><br/>Take a look around the world, we've got Trump, Putin (of course), Xi Jinping, Kim Jong Un, Lukashenko, Viktor Orban and I'd like to include India's  - [21 February 2025 - 1 comments]</span></p><p class="cat-entry"><img class="cat-thumb" src="https://res.cloudinary.com/the-weekly-gripe/image/fetch/https://www.weeklygripe.co.uk/AImg/weepics/a1314.jpg" alt="The Decline of Everyday Manners: Swearing in Public" /><a href="swearing-in-public">The Decline of Everyday Manners: Swearing in Public</a><span class="cat-text"><br/>Public spaces should be for everyone, and that includes those who don’t want to hear a stream of profanities while going about their day. When it  - [5 February 2025 - 1 comments]</span></p><p class="cat-entry"><img class="cat-thumb" src="https://res.cloudinary.com/the-weekly-gripe/image/fetch/https://www.weeklygripe.co.uk/AImg/weepics/a1313.jpg" alt="Late trains and unsympathetic bosses" /><a href="late-trains-unsympathetic-bosses">Late trains and unsympathetic bosses</a><span class="cat-text"><br/>My gripe dates back to a time long before TFL and Journey Planner or any of the other delay-verifying software now available.&nbsp; In fact, even  - [15 June 2024 - 1 comments]</span></p><p class="cat-entry"><img class="cat-thumb" src="https://res.cloudinary.com/the-weekly-gripe/image/fetch/https://www.weeklygripe.co.uk/AImg/weepics/a1312.jpg" alt="Experience Days: Fun for Participants, Unfair for Spectators" /><a href="unfair-experience-day-spectators">Experience Days: Fun for Participants, Unfair for Spectators</a><span class="cat-text"><br/>Don't let experience day providers spoil your day out! Charging extra for spectators is unfair and leaves friends and family feeling excluded.  - [27 February 2023 - 1 comments]</span></p><p class="cat-entry"><img class="cat-thumb" src="https://res.cloudinary.com/the-weekly-gripe/image/fetch/https://www.weeklygripe.co.uk/AImg/weepics/a1311.jpg" alt="Depressing news: NHS & rail strikes, cost of living and Ukraine war" /><a href="depressing-news-strikes-energy-food-ukraine">Depressing news: NHS & rail strikes, cost of living and Ukraine war</a><span class="cat-text"><br/>It's early December and thoughts of Christmas couldn't be further from my mind, but this isn't a gripe about that, it's the headlines on the news that - [6 December 2022 - 3 comments]</span></p><p class="cat-entry"><img class="cat-thumb" src="https://res.cloudinary.com/the-weekly-gripe/image/fetch/https://www.weeklygripe.co.uk/AImg/weepics/a1310.jpg" alt="Selfish workers on strike causing misery for everyone" /><a href="workers-on-strike-are-selfish">Selfish workers on strike causing misery for everyone</a><span class="cat-text"><br/>Pretty much every other day on the news at the moment you hear about another group of workers walking out and going on strike. In my opinion it's a  - [28 August 2022 - 9 comments]</span></p><p class="cat-entry"><img class="cat-thumb" src="https://res.cloudinary.com/the-weekly-gripe/image/fetch/https://www.weeklygripe.co.uk/AImg/weepics/a1309.jpg" alt="No Freedom Of Choice With Religiously Slaughtered Meat" /><a href="freedom-of-choice-with-religiously-slaughtered-meat">No Freedom Of Choice With Religiously Slaughtered Meat</a><span class="cat-text"><br/>My issue today is regarding freedom of choice - especially when it comes to food, in particular as to whether you choose RS (religiously slaughtered)  - [29 July 2022 - 1 comments]</span></p><p class="cat-entry"><img class="cat-thumb" src="https://res.cloudinary.com/the-weekly-gripe/image/fetch/https://www.weeklygripe.co.uk/AImg/weepics/a1308.jpg" alt="The cost of living in the UK is too high" /><a href="cost-of-living-too-high">The cost of living in the UK is too high</a><span class="cat-text"><br/>Everything is now too expensive. Shopping for food at reduction time is the norm and planning meals on what's available rather than what we'd like. - [5 July 2022 - 5 comments]</span></p><p class="cat-entry"><img class="cat-thumb" src="https://res.cloudinary.com/the-weekly-gripe/image/fetch/https://www.weeklygripe.co.uk/AImg/weepics/a1307.jpg" alt="Apple Developer Program Membership is a ripoff!" /><a href="apple-developer-program-membership-ripoff">Apple Developer Program Membership is a ripoff!</a><span class="cat-text"><br/>It's that time of year again, time to renew the Apple Developer Program Membership and I still believe we're being ripped off every year. - [20 January 2022 - 2 comments]</span></p><p class="cat-entry"><img class="cat-thumb" src="https://res.cloudinary.com/the-weekly-gripe/image/fetch/https://www.weeklygripe.co.uk/AImg/weepics/a1306.jpg" alt="Scotland's rules on alcohol promotions are unfair" /><a href="scotland-drink-promotions">Scotland's rules on alcohol promotions are unfair</a><span class="cat-text"><br/>I am now officially fed up with alcohol laws in Scotland having noticed an email in my inbox telling me that Green King is giving away free pints of  - [2 December 2021 - 1 comments]</span></p><p class="cat-entry"><img class="cat-thumb" src="https://res.cloudinary.com/the-weekly-gripe/image/fetch/https://www.weeklygripe.co.uk/AImg/weepics/a1303.jpg" alt="No help from Argos online with Love2Shop gift vouchers" /><a href="love2shop-gift-voucher-argos">No help from Argos online with Love2Shop gift vouchers</a><span class="cat-text"><br/>I have tried to use Love2Shop gift cards online with Argos today, but no joy. I have clicked on 'Gift Cards' when trying to pay, but it says there is  - [17 August 2021 - 4 comments]</span></p><p class="cat-entry"><img class="cat-thumb" src="https://res.cloudinary.com/the-weekly-gripe/image/fetch/https://www.weeklygripe.co.uk/AImg/weepics/a1300.jpg" alt="Pub charged an extra pound for 2 halves instead of a pint" /><a href="half-pint-of-beer-costs-more">Pub charged an extra pound for 2 halves instead of a pint</a><span class="cat-text"><br/>A pint for &pound4.40 and a pint for &pound;5.40 with the only difference being two glasses instead of one, is that justifiable? - [8 August 2021 - 13 comments]</span></p>			</article>
		</div>
		<div id="rightbar" class="grid__col grid__col--1-of-5">	
		<nav class="sidebar">
			<ul>
				<li><a href="music-and-entertainment" title="Music and Entertainment">Music / Entertainment</a></li>	
				<li><a href="transport-and-travel" title="Transport and Travel">Transport / Travel</a></li>	
				<li><a href="health-and-education" title="Health and Education">Health / Education</a></li>	
				<li><a href="shopping-and-consumer" title="Shopping and Consumer">Shopping / Consumer</a></li>	
				<li><a href="sport-and-recreation" title="Sport and Recreation">Sport / Recreation</a></li>	
				<li><a href="politics-and-law" title="Politics and Law">Politics / Law</a></li>	
				<li><a href="world-and-culture" title="World and Culture">World / Culture</a></li>	
				<li><a href="food-and-drink" title="Food and Drink">Food / Drink</a></li>	
				<li><a href="finance-and-business" title="Finance and Business">Finance / Business</a></li>	
				<li><a href="family-and-relationships" title="Family and Relationships">Family / Relationships</a></li>	
				<li><a href="communities-and-society" title="Communities and Society">Communities / Society</a></li>	
				<li><a href="industry-and-jobs" title="Industry and Jobs">Industry / Jobs</a></li>	
				<li><a href="home-and-garden" title="Home and Garden">Home / Garden</a></li>	
				<li><a href="animals-and-pets" title="Animals and Pets">Amimals / Pets</a></li>	
				<li><a href="computers-and-internet" title="Computers and Internet">Computers / Internet</a></li>	
				<li><a href="miscellaneous" title="Miscellaneous gripes">Miscellaneous</a></li>	
 			</ul>
		</nav>	
			
					<div id="adsense2">
				<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
				<!-- 2015ResponsiveAd2 -->
				<ins class="adsbygoogle"
   		  			style="display:block"
					data-full-width-responsive="true"
    	 			data-ad-client="ca-pub-7787672720928246"
     				data-ad-slot="1163095494"
     				data-ad-format="auto"></ins>
				<script>
					(adsbygoogle = window.adsbygoogle || []).push({});
				</script>
			</div>
				
				</div>
	</div>	<div class="grid grid--no-gutter" id="category-select">	
		<select  class="grid__col grid__col--5-of-5">
				<option value="" selected>--- jump to category ---</option>
				<option value="music-and-entertainment" title="Music and Entertainment">Music / Entertainment</option>	
				<option value="transport-and-travel" title="Transport and Travel">Transport / Travel</option>	
				<option value="music-and-entertainment" title="Music and Entertainment">Health / Education</option>	
				<option value="shopping-and-consumer" title="Shopping and Consumer">Shopping / Consumer</option>	
				<option value="sport-and-recreation" title="Sport and Recreation">Sport / Recreation</option>	
				<option value="politics-and-law" title="Politics and Law">Politics / Law</option>	
				<option value="world-and-culture" title="World and Culture">World / Culture</option>	
				<option value="food-and-drink" title="Food and Drink">Food / Drink</option>	
				<option value="finance-and-business" title="Finance and Business">Finance / Business</option>	
				<option value="family-and-relationships" title="Family and Relationships">Family / Relationships</option>
				<option value="communities-and-society" title="Communities and Society">Communities / Society</option>
				<option value="industry-and-jobs" title="Industry and Jobs">Industry / Jobs</option>	
				<option value="home-and-garden" title="Home and Garden">Home / Garden</option>	
				<option value="animals-and-pets" title="Animals and Pets">Amimals / Pets</option>	
				<option value="computers-and-internet" title="Computers and Internet">Computers / Internet</option>	
				<option value="miscellaneous" title="Miscellaneous gripes">Miscellaneous</option>	
		</select>
	</div>
	<div id="features-mobile">
		<h3>FEATURES</h3>
		<a href="gripe-the-news"><img src="Images/gripe-news.jpg" alt="Gripes the News"/></a>
		<br/>
		<a href="gripes-in-the-pipes"><img src="Images/gripes-pipes.jpg" alt="Gripes in the pipes"/></a>
		<br/>
		<a href="get-on-the-soapbox"><img src="Images/soapbox.jpg" alt="The Soapbox"/></a>
	</div>
	<footer class="grid grid--no-gutter">	
		<div class="grid__col grid__col--1-of-5">
		
		</div>
		<div class="grid__col grid__col--4-of-5">
		<p id="bottomlinks">
			<a href="privacy-policy-and-disclaimer">Disclaimer</a> |
			<a href="privacy-policy-and-disclaimer">Privacy Policy</a> |
			<a href="/notifications">Notifications  <img src="/Images/bell_off.png" class="bell"/></a>		</p>
		</div>
	</footer>
	<div id="spinner">
		<img src="Images/spinner-3.gif" alt="spinner" title="spinner"/>
	</div>

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
	<script>	
	var typingTimer;
	var doneTypingInterval = 500; 	
	$(function() {    
		// remove hidden adsense
		// hamburger menu
		if (Notification.permission === "granted") {
			$(".bell").attr("src","/Images/bell_on.png").css("visibility","visible");
			var lastping=localStorage.getItem('pingdate')
			if (lastping===null) {
				localStorage.setItem('pingdate',new Date());
			} else {				
				var newping=new Date();	
				var oldping=new Date(lastping);
				const diffTime = Math.abs(newping - oldping);
				const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24)); 
				console.log(diffDays+' '+diffTime);
			}
		} else {
			$(".bell").css("visibility","visible");
		}
		$("#hamburger").on("click", function(e) {
			//$("#slide-menu").animate({width: 'toggle'});
			$("#slide-menu").slideToggle();
		});
		$("#btnNotifyPrefs").on("click", function(e) {
			e.preventDefault();
			requestPermission();
		});
		
		$("#newcomment").on( "submit", function( e ) {
			e.preventDefault();
			$("#comment-form-error").empty();
			$("#spinner").show();
			$.ajax({
  				method: "POST",
  				url: "pagescripts/post-comment.php",
  				data: $(this).serialize()
			})
  			.done(function( data ) {
				if (data.result==0) {
					$(".pager:first").find(".gofirst").trigger("click"); // goto first page
					$("#comment-form-error").html(data.message);
					$("#comment-form-error").css("background-color","#080").css("display","block");
					$("#newcomment")[0].reset();
				} else if (data.result==-2) {
					window.location.replace("https://www.weeklygripe.co.uk/recent-comments-from-visitors");
				} else {
					$("#comment-form-error").html(data.error).css("background-color","#800").css("display","block");
				}
			})
			.always(function() {
				grecaptcha.reset();
				$("#spinner").hide();				
			});
		});
		
		$("#your-gripe").on( "submit", function(e) {
			e.preventDefault();
			$("#spinner").show();
			$.ajax({
  				method: "POST",
  				url: "pagescripts/your-gripe-post.php",
  				data: $(this).serialize()
			})
  			.done(function( data ) {
				if (data.success==1) {
					$("#your-gripe")[0].reset();
					$("#gripe-form-error").html("Thanks, we've sent your gripe to the gripe master.");
					$("#gripe-form-error").css("background-color","#8f8");
				} else {
					$("#gripe-form-error").html(data.error);
				}
			})
			.always(function() {
				grecaptcha.reset();
				$("#spinner").hide();				
			});
		});
		
		$("#registerform").on( "submit", function(e) {
			e.preventDefault();
			$("#spinner").show();
			$.ajax({
  				method: "POST",
  				url: "pagescripts/register.php",
  				data: $(this).serialize()
			})
  			.done(function( data ) {
				if (data.success==1) {
					$("#registerform")[0].reset();
					$("#register-form-error").html(data.error);
					$("#register-form-error").css("background-color","#080");
				} else {
					$("#register-form-error").html(data.error);
				}
			})
			.always(function() {
				grecaptcha.reset();
				$("#spinner").hide();				
			});
		});
		
		$(".piper").on("click",function(e){
			$(".pipe-content").slideUp();
			$(".pipe-content[data-pipe="+$(this).data("pipe")+"]").slideToggle();
		});	

		$(".pipe-button").on("click",function(e){
			document.location="your-gripe?pipe="+$(this).data("pipe");
		})
		
		$('#searchfield').on('keyup', function () {
			clearTimeout(typingTimer);
			typingTimer = setTimeout(doneTyping, doneTypingInterval);
		});
	
		$('#searchfield').on('keydown', function () {
			clearTimeout(typingTimer);
		});
		
		document.getElementById("searchfield").addEventListener("search", function(event) {
			$("header").css("display","block");
			$("#main").css("display","block");
			$("#results").css("display","none");
		});
	
		function doneTyping () {
			console.log('search-'+$("#searchfield").val());
			$.get( "/pagescripts/json_search.php?query="+$("#searchfield").val(), function( data ) {
				console.log(data.length);
				if (data.length>0) {
					$("#results").empty();
					$("#results").css("display","block");
					$("header").css("display","none");
					$("article#main").css("display","none");
					$.each(data, function(index) {				
						$("#results").append('<p><a href="https://www.weeklygripe.co.uk/'+data[index].FriendlyName+'">'+data[index].Title+'</a><br/>'+data[index].ShortDesc+'</p>');
					});
				} else {
					$("header").css("display","block");
					$("#main").css("display","block");
					$("#results").css("display","none");
				}
		    });
		}   
		
		doPager();
		
	}); // end of document ready
		
	function doPager() {		
		var scpt='';
		var autolinker = new Autolinker( { newWindow: true, truncate: 25, className: 'clink' } );
		$("#allcomments").html(autolinker.link($("#allcomments").html()));
		$(".gotopage").click(function(e) {
			e.preventDefault();
			var filter=$(this).parent().attr("data-filter");
			var url="pagescripts/"+scpt+"?goto="+$(this).attr("data-jump")+"&sort="+$(".sortorder").val()+'&filter='+filter;
			$("#spinner").show();
			$.ajax({
  				method: "GET",
  				url: url
			})
  			.done(function( data ) {
				$(".paginated").empty().html(data);
				doPager();			})
			.always(function() {
				$("#spinner").hide();				
			});		
		});
		
		$(".sortorder").change(function() {
			$(".pager:first").find(".gofirst").trigger("click");
		});	
		
		// karma
		$(".add-k").click(function(e){
			id=$(this).data("id");
			$.get( "pagescripts/karma.php?id="+id+"&k=1", function( data ) {
  				if (data.response==0) {
					k=$(".kc"+id).html();
					$(".kc"+id).html(parseInt(k)+1)
				} else {
				}
			});
		});
		$(".sub-k").click(function(e){			
			id=$(this).data("id");
			$.get( "pagescripts/karma.php?id="+id, function( data ) {
				if (data.response==0) {
					k=$(".kc"+id).html();
					$(".kc"+id).html(parseInt(k)-1)
					if (k<1) {
						$(".kc"+id).addClass("redkarma");
					}
				} else {
				}
			});
		});	
		$("[name='postas']").on("click", function(e) {
			if ($(this).val()==0) {
				$("#commentnick").prop("readonly",false);
			} else {
				$("#commentnick").prop("readonly",true);
			}
		})		
					
	}		

	function getToken() {
		messaging.getToken({vapidKey: 'BOLyOieJriN3lRgGGYsbT6mBJm86E41QnK6BHOR79IB--ss7PASD4glOCt9n9uU4VMgMiJQAIG7bqtNf-EhubvI'}).then((currentToken) => {
			if (currentToken) {
				console.log('current token '+currentToken);
				$(".bell").attr("src","/Images/bell_on.png");
				sendTokenToServer(currentToken);
			} else {
				// Show permission request.
				console.log('No registration token available. Request permission to generate one.');
				// Show permission UI.
				//updateUIForPushPermissionRequired();
				requestPermission();
				setTokenSentToServer(false);
			}
		}).catch((err) => {
			console.log('An error occurred while retrieving token. ', err);
		//showToken('Error retrieving registration token. ', err);
			setTokenSentToServer(false);
		});  
		
		messaging.onMessage((payload) => {
			console.log('Message received! ', payload);
		});
	}

	function isTokenSentToServer() {
    	return window.localStorage.getItem('sentToServer') === '1';
  	}

  	function setTokenSentToServer(sent) {
    	window.localStorage.setItem('sentToServer', sent ? '1' : '0');
  	}

  	function sendTokenToServer(token) {
/*
		$.ajax({
  			method: "POST",
  			url: "pagescripts/registernotification.php",
  			data: $(this).serialize()
		})
  		.done(function( data ) {
			if (data.success==1) {
				$("#your-gripe")[0].reset();
					$("#gripe-form-error").html("Thanks, we've sent your gripe to the gripe master.");
					$("#gripe-form-error").css("background-color","#080");
				} else {
					$("#gripe-form-error").html(data.error);
				}
			})
		.always(function() {
			grecaptcha.reset();
			$("#spinner").hide();				
		});
*/
  	}
		
	function requestPermission() {
		console.log('Requesting permission...');
		Notification.requestPermission().then((permission) => {
			if (permission === 'granted') {
				console.log('Notification permission granted.');
				getToken();
				console.log('permission granted');
				// TODO(developer): Retrieve a registration token for use with FCM.
				// [START_EXCLUDE]
				// In many cases once an app has been granted notification permission,
				// it should update its UI reflecting this.
				// [END_EXCLUDE]
			} else {
				console.log('Unable to get permission to notify.');
			}
		});
	}


	</script>	
  <script src="js/Autolinker.min.js"></script>	
</div>
</body>		
</html>	