Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
P
PWATraining
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
training
PWATraining
Commits
acf85360
Commit
acf85360
authored
Jul 27, 2020
by
pwatraining
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
starter
parent
5f17c013
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
370 deletions
+17
-370
index.html
src/index.html
+0
-1
app.js
src/js/app.js
+15
-293
share.js
src/js/share.js
+1
-20
manifest.json
src/manifest.json
+0
-55
sw.js
src/sw.js
+1
-1
No files found.
src/index.html
View file @
acf85360
...
...
@@ -13,7 +13,6 @@
<title>
PWATraining
</title>
<link
rel=
"shortcut icon"
href=
"/favicon.ico"
>
<link
rel=
"manifest"
href=
"/manifest.json"
>
<link
rel=
"canonical"
href=
"https://uitmpwatraining.web.app/"
>
...
...
src/js/app.js
View file @
acf85360
This diff is collapsed.
Click to expand it.
src/js/share.js
View file @
acf85360
(
function
()
{
'use strict'
;
function
webShare
()
{
var
title
=
'Training PWA UiTM'
;
var
text
=
'(WIP-Working In Progress)'
;
var
url
=
document
.
querySelector
(
'link[rel=canonical]'
).
href
;
//console.log(title + "\n" + text + '\n⇒ ' + url);
if
(
navigator
.
share
===
undefined
)
{
//toast('Unsupported feature: Web Share');
//console.log('Error: Unsupported feature: navigator.share');
window
.
open
(
"https://api.whatsapp.com/send?text="
+
window
.
encodeURIComponent
(
text
+
'
\
n⇒ '
+
url
));
return
;
}
navigator
.
share
({
title
:
title
,
text
:
text
,
url
:
url
})
.
then
(
function
()
{})
.
catch
(
function
(
error
)
{});
}
document
.
querySelector
(
'#btnShare'
).
addEventListener
(
'click'
,
webShare
);
})();
src/manifest.json
deleted
100644 → 0
View file @
5f17c013
{
"name"
:
"PWA Training"
,
"short_name"
:
"PWATraining"
,
"description"
:
"Initial release of web app. Work-in-progress (WIP)."
,
"theme_color"
:
"#2f3ba2"
,
"background_color"
:
"#3e4eb8"
,
"display"
:
"standalone"
,
"orientation"
:
"portrait"
,
"scope"
:
"/"
,
"start_url"
:
"/?utm_source=standalone&utm_medium=pwa"
,
"icons"
:
[
{
"src"
:
"images/icons/icon-72x72.png"
,
"sizes"
:
"72x72"
,
"type"
:
"image/png"
},
{
"src"
:
"images/icons/icon-96x96.png"
,
"sizes"
:
"96x96"
,
"type"
:
"image/png"
},
{
"src"
:
"images/icons/icon-128x128.png"
,
"sizes"
:
"128x128"
,
"type"
:
"image/png"
},
{
"src"
:
"images/icons/icon-144x144.png"
,
"sizes"
:
"144x144"
,
"type"
:
"image/png"
},
{
"src"
:
"images/icons/icon-152x152.png"
,
"sizes"
:
"152x152"
,
"type"
:
"image/png"
},
{
"src"
:
"images/icons/icon-192x192.png"
,
"sizes"
:
"192x192"
,
"type"
:
"image/png"
},
{
"src"
:
"images/icons/icon-384x384.png"
,
"sizes"
:
"384x384"
,
"type"
:
"image/png"
},
{
"src"
:
"images/icons/icon-512x512.png"
,
"sizes"
:
"512x512"
,
"type"
:
"image/png"
}
],
"lang"
:
"English"
,
"splash_pages"
:
null
}
src/sw.js
View file @
acf85360
...
...
@@ -3,7 +3,7 @@
if
(
workbox
)
{
console
.
log
(
`Yay! Workbox is loaded 🎉`
);
workbox
.
precaching
.
precacheAndRoute
([{
"revision"
:
"
56dceb8d62294cd2524cf532bdf8eec7"
,
"url"
:
"index.html"
},{
"revision"
:
"6f38b559ee2733468231d0e3589a46f2"
,
"url"
:
"favicon.ico"
},{
"revision"
:
"841ccc0972018aa8e1ff3336f9279847"
,
"url"
:
"css/app.css"
},{
"revision"
:
"64cda5a0c8525157ac311b4c0984a650"
,
"url"
:
"js/app.js"
},{
"revision"
:
"ae75e72cfa193100f2baba436c50616b"
,
"url"
:
"js/menu.js"
},{
"revision"
:
"70b828e6a680aa61b26c26b8ed704b92"
,
"url"
:
"js/share.js"
},{
"revision"
:
"862385e0c7db3e2cd56c62c89388baa7
"
,
"url"
:
"js/swipe.js"
},{
"revision"
:
"609e8f6ce7aa15cd2e5effde31057a80"
,
"url"
:
"js/toast.js"
},{
"revision"
:
"9cff0b914c679f32a3c1e4162f80522a"
,
"url"
:
"images/badges/notification_192.png"
},{
"revision"
:
"784b1c63c7be412d166db4a3d49f2501"
,
"url"
:
"images/icons/icon-128x128.png"
},{
"revision"
:
"adb787791bb14d1a5a076321c886b171"
,
"url"
:
"images/icons/icon-144x144.png"
},{
"revision"
:
"e25a0afa07977ad1039a46b9ab82daee"
,
"url"
:
"images/icons/icon-152x152.png"
},{
"revision"
:
"86e1f0fae80ecb97faad31f57d88aaec"
,
"url"
:
"images/icons/icon-192x192.png"
},{
"revision"
:
"72c220ac025d55ff95abe164ffb31db4"
,
"url"
:
"images/icons/icon-384x384.png"
},{
"revision"
:
"720fb062cb6d0f37070a9d877967a894"
,
"url"
:
"images/icons/icon-512x512.png"
},{
"revision"
:
"c03ad90690383f8dc249bb6c7a407aab"
,
"url"
:
"images/icons/icon-72x72.png"
},{
"revision"
:
"2ee2cc270deb2d95e2c8773398eff1fe"
,
"url"
:
"images/icons/icon-96x96.png"
},{
"revision"
:
"1b9053762212073bbade3145680cbf41"
,
"url"
:
"images/logoUiTM.svg"
}]);
workbox
.
precaching
.
precacheAndRoute
([{
"revision"
:
"
b1c77f9c5225951a9c6bd70d4188fa6a"
,
"url"
:
"index.html"
},{
"revision"
:
"6f38b559ee2733468231d0e3589a46f2"
,
"url"
:
"favicon.ico"
},{
"revision"
:
"fa694d319ff249bbafc9b0ebeb5bdd8a"
,
"url"
:
"css/app.css"
},{
"revision"
:
"0d606a447f16af75e775b64b27f3c442"
,
"url"
:
"js/app.js"
},{
"revision"
:
"ae75e72cfa193100f2baba436c50616b"
,
"url"
:
"js/menu.js"
},{
"revision"
:
"07eab90e6269c3f19ddc34ddfb890adf"
,
"url"
:
"js/share.js"
},{
"revision"
:
"fc8aef5e3399c8fb6efea89b54459f11
"
,
"url"
:
"js/swipe.js"
},{
"revision"
:
"609e8f6ce7aa15cd2e5effde31057a80"
,
"url"
:
"js/toast.js"
},{
"revision"
:
"9cff0b914c679f32a3c1e4162f80522a"
,
"url"
:
"images/badges/notification_192.png"
},{
"revision"
:
"784b1c63c7be412d166db4a3d49f2501"
,
"url"
:
"images/icons/icon-128x128.png"
},{
"revision"
:
"adb787791bb14d1a5a076321c886b171"
,
"url"
:
"images/icons/icon-144x144.png"
},{
"revision"
:
"e25a0afa07977ad1039a46b9ab82daee"
,
"url"
:
"images/icons/icon-152x152.png"
},{
"revision"
:
"86e1f0fae80ecb97faad31f57d88aaec"
,
"url"
:
"images/icons/icon-192x192.png"
},{
"revision"
:
"72c220ac025d55ff95abe164ffb31db4"
,
"url"
:
"images/icons/icon-384x384.png"
},{
"revision"
:
"720fb062cb6d0f37070a9d877967a894"
,
"url"
:
"images/icons/icon-512x512.png"
},{
"revision"
:
"c03ad90690383f8dc249bb6c7a407aab"
,
"url"
:
"images/icons/icon-72x72.png"
},{
"revision"
:
"2ee2cc270deb2d95e2c8773398eff1fe"
,
"url"
:
"images/icons/icon-96x96.png"
},{
"revision"
:
"1b9053762212073bbade3145680cbf41"
,
"url"
:
"images/logoUiTM.svg"
}]);
workbox
.
googleAnalytics
.
initialize
();
...
...
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