rm svc worker
This commit is contained in:
@@ -10,13 +10,13 @@
|
||||
})();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var appInsights=window.appInsights||function(config){
|
||||
function i(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},u=document,e=window,o="script",s="AuthenticatedUserContext",h="start",c="stop",l="Track",a=l+"Event",v=l+"Page",y=u.createElement(o),r,f;y.src=config.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js";u.getElementsByTagName(o)[0].parentNode.appendChild(y);try{t.cookie=u.cookie}catch(p){}for(t.queue=[],t.version="1.0",r=["Event","Exception","Metric","PageView","Trace","Dependency"];r.length;)i("track"+r.pop());return i("set"+s),i("clear"+s),i(h+a),i(c+a),i(h+v),i(c+v),i("flush"),config.disableExceptionTracking||(r="onerror",i("_"+r),f=e[r],e[r]=function(config,i,u,e,o){var s=f&&f(config,i,u,e,o);return s!==!0&&t["_"+r](config,i,u,e,o),s}),t
|
||||
}({
|
||||
instrumentationKey:"974b47d2-1f08-42df-b498-bbfda7425f0b"
|
||||
});
|
||||
// var appInsights=window.appInsights||function(config){
|
||||
// function i(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},u=document,e=window,o="script",s="AuthenticatedUserContext",h="start",c="stop",l="Track",a=l+"Event",v=l+"Page",y=u.createElement(o),r,f;y.src=config.url||"https://az416426.vo.msecnd.net/scripts/a/ai.0.js";u.getElementsByTagName(o)[0].parentNode.appendChild(y);try{t.cookie=u.cookie}catch(p){}for(t.queue=[],t.version="1.0",r=["Event","Exception","Metric","PageView","Trace","Dependency"];r.length;)i("track"+r.pop());return i("set"+s),i("clear"+s),i(h+a),i(c+a),i(h+v),i(c+v),i("flush"),config.disableExceptionTracking||(r="onerror",i("_"+r),f=e[r],e[r]=function(config,i,u,e,o){var s=f&&f(config,i,u,e,o);return s!==!0&&t["_"+r](config,i,u,e,o),s}),t
|
||||
// }({
|
||||
// instrumentationKey:"974b47d2-1f08-42df-b498-bbfda7425f0b"
|
||||
// });
|
||||
|
||||
window.appInsights=appInsights;
|
||||
appInsights.trackPageView();
|
||||
// window.appInsights=appInsights;
|
||||
// appInsights.trackPageView();
|
||||
</script>
|
||||
<% } %>
|
||||
@@ -44,26 +44,26 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
//Add this below content to your HTML page, or add the js file to your page at the very top to register sercie worker
|
||||
if (navigator.serviceWorker.controller) {
|
||||
console.log('[PWA Builder] active service worker found, no need to register')
|
||||
} else {
|
||||
// if (navigator.serviceWorker.controller) {
|
||||
// console.log('[PWA Builder] active service worker found, no need to register')
|
||||
// } else {
|
||||
|
||||
//Register the ServiceWorker
|
||||
navigator.serviceWorker.register('sw.js', {
|
||||
scope: '/'
|
||||
}).then(function(reg) {
|
||||
console.log('Service worker has been registered for scope:'+ reg.scope);
|
||||
});
|
||||
}
|
||||
var fetched = [];
|
||||
if(fetch){
|
||||
$("a").each(function(index, item) {
|
||||
if(!item.href.startsWith("http::") && item.href.startsWith("https::") && !fetched.includes(item.href)){
|
||||
fetched.push(item.href);
|
||||
fetch(item.href);
|
||||
}
|
||||
});
|
||||
}
|
||||
// //Register the ServiceWorker
|
||||
// navigator.serviceWorker.register('sw.js', {
|
||||
// scope: '/'
|
||||
// }).then(function(reg) {
|
||||
// console.log('Service worker has been registered for scope:'+ reg.scope);
|
||||
// });
|
||||
// }
|
||||
// var fetched = [];
|
||||
// if(fetch){
|
||||
// $("a").each(function(index, item) {
|
||||
// if(!item.href.startsWith("http::") && item.href.startsWith("https::") && !fetched.includes(item.href)){
|
||||
// fetched.push(item.href);
|
||||
// fetch(item.href);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user