Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mastofe
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Claire
mastofe
Commits
3c20bc61
Verified
Commit
3c20bc61
authored
Mar 31, 2018
by
Morgan Bazalgette
Committed by
Haelwenn
Apr 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default when there is no applicationServerKey meta on the page
parent
6c88dfdf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
app/javascript/flavours/glitch/actions/push_notifications/registerer.js
.../flavours/glitch/actions/push_notifications/registerer.js
+4
-1
app/javascript/mastodon/actions/push_notifications/registerer.js
...ascript/mastodon/actions/push_notifications/registerer.js
+4
-1
No files found.
app/javascript/flavours/glitch/actions/push_notifications/registerer.js
View file @
3c20bc61
...
...
@@ -18,7 +18,10 @@ const urlBase64ToUint8Array = (base64String) => {
return
outputArray
;
};
const
getApplicationServerKey
=
()
=>
document
.
querySelector
(
'
[name="applicationServerKey"]
'
).
getAttribute
(
'
content
'
);
const
getApplicationServerKey
=
()
=>
{
const
k
=
document
.
querySelector
(
'
[name="applicationServerKey"]
'
);
return
k
===
null
?
''
:
k
.
getAttribute
(
'
content
'
);
};
const
getRegistration
=
()
=>
navigator
.
serviceWorker
.
ready
;
...
...
app/javascript/mastodon/actions/push_notifications/registerer.js
View file @
3c20bc61
...
...
@@ -14,7 +14,10 @@ const urlBase64ToUint8Array = (base64String) => {
return
decodeBase64
(
base64
);
};
const
getApplicationServerKey
=
()
=>
document
.
querySelector
(
'
[name="applicationServerKey"]
'
).
getAttribute
(
'
content
'
);
const
getApplicationServerKey
=
()
=>
{
const
k
=
document
.
querySelector
(
'
[name="applicationServerKey"]
'
);
return
k
===
null
?
''
:
k
.
getAttribute
(
'
content
'
);
};
const
getRegistration
=
()
=>
navigator
.
serviceWorker
.
ready
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment