Added date to shared request URL content

This commit is contained in:
Liyas Thomas
2019-09-05 17:00:30 +05:30
parent f246df572b
commit 163be1f1b5

View File

@@ -693,9 +693,10 @@
if (navigator.share) { if (navigator.share) {
let title = document.title; let title = document.title;
let time = new Date().toLocaleTimeString(); let time = new Date().toLocaleTimeString();
let date = new Date().toLocaleDateString();
navigator.share({ navigator.share({
title: title, title: title,
text: time, text: `at ${time} on ${date}`,
url: window.location.href url: window.location.href
}).then(() => { }).then(() => {
// console.log('Thanks for sharing!'); // console.log('Thanks for sharing!');