Feature/#19 notifications tab title #31
|
@ -13,10 +13,26 @@ runAfterPathnameChange(() => {
|
|||
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
function getNotificationCount() {
|
||||
if (isLoggedIn) {
|
||||
let menuUserText = document.getElementById('materialize-menu-dropdown').innerText.split('\n')[4];
|
||||
return menuUserText.split(" ")[1] + ' ';
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
let notificationCount = menuUserText.split("")[6];
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
console.log(notificationCount);
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
// If there are no notifications
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
if (Number.isNaN(parseInt(notificationCount)) || typeof notificationCount === 'undefined') {
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
console.warn("NaN or undefined");
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
return ``; // Otherwise displayNotificationsInTitle() throws undefined again
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
}
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
// Notifications present
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
else {
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
return `(${notificationCount}) `;
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
}
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
}
|
||||
}
|
||||
|
||||
function displayNotificationsInTitle(){
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
document.title = __notificationCount + document.title;
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
function displayNotificationsInTitle() {
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
console.log(__notificationCount);
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
if (typeof __notificationCount === 'undefined') {
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
console.error("NoTiFiCaTiOnCoUnT uNdEfInEd!");
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
}
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
else {
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
document.title = __notificationCount + document.title;
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
}
|
||||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
||||
}
|
||||
|
|
|||
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think: There probably also has to be a check if user is logged in and if there even is a notification I think.
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
```js
menuDropdowns.querySelector('li a[href="notification"]')?.innerText?.match('\\d+')[0] ?? ''
```
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert. We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.
>
>
> Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
> ![image](https://user-images.githubusercontent.com/8461282/89397194-d5d1d000-d70f-11ea-804b-f4ca40b9c65d.png)
Yeah the 3 is the correct index here, your split is missing another space.
![chrome_8SQg6ZZOCH](https://user-images.githubusercontent.com/29717789/89420569-2eff2b00-d733-11ea-95e1-8735ac78c4eb.png)
Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether Right now there is a space added after the number in line 16; however I'll take a look into retrieving the notificationCount via regex since its not always working on pathnames like /watch2gether
> There probably also has to be a check if user is logged in and if there even is a notification I think.
9fe2668c3afec7a4b100cffc9ae722d1baa13fe7 adds checks for logged in + notifications
|
Is 3 the correct index here? I just executed this via console and it wasn´t working correctly I think:
There probably also has to be a check if user is logged in and if there even is a notification I think.
You may try getting it via regular expression:
We should also insert a space after the number (at least the code I put in the other comment is without space). Also only add the space if there are notifications to insert.