Ver código fonte

Removed SW Completely

Yoginth 7 anos atrás
pai
commit
ed6b8c7751
2 arquivos alterados com 0 adições e 80 exclusões
  1. 0 67
      public/serviceworker.js
  2. 0 13
      templates/base/head.tmpl

+ 0 - 67
public/serviceworker.js

@@ -1,67 +0,0 @@
-var STATIC_CACHE = 'gitote-sw-cache';
-var urlsToCache = [
-  // js
-  'expansion/expansion.js',
-  'https://cdn.gitote.in/js/gitote.js',
-  'https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js',
-  'https://cdnjs.cloudflare.com/ajax/libs/jquery.AreYouSure/1.9.0/jquery.are-you-sure.min.js',
-  'https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.3.1/semantic.min.js',
-  'https://cdn.gitote.in/plugins/highlight/highlight.pack.js',
-  'https://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/js/emojify.min.js',
-  'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.5.9/clipboard.min.js',
-  'https://cdn.jsdelivr.net/npm/notebookjs@0.3.0/notebook.min.js',
-  'https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.6/marked.min.js',
-  'https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.10.1/simplemde.min.js',
-  'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.17.0/addon/mode/loadmode.js',
-  'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.17.0/mode/meta.js',
-  'https://cdnjs.cloudflare.com/ajax/libs/autosize.js/4.0.2/autosize.min.js',
-  'https://cdnjs.cloudflare.com/ajax/libs/dropzone/4.2.0/dropzone.js',
-  'https://cdn.gitote.in/plugins/datetimepicker/jquery.datetimepicker.js',
-  'https://cdnjs.cloudflare.com/ajax/libs/jquery-minicolors/2.2.3/jquery.minicolors.min.js',
-
-  
-  // css
-  '/css/gitote.min.css',
-  'https://cdn.gitote.in/css/bundle.css',
-  'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css',
-  'https://unpkg.com/gitote@1.3.6/plugins/octicons/octicons.min.css',
-  'https://cdn.gitote.in/plugins/highlight/github.css',
-  'https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.10.1/simplemde.min.css',
-  'https://cdnjs.cloudflare.com/ajax/libs/dropzone/4.2.0/dropzone.css',
-  'https://cdn.gitote.in/plugins/datetimepicker/jquery.datetimepicker.css',
-  'https://cdnjs.cloudflare.com/ajax/libs/jquery-minicolors/2.2.3/jquery.minicolors.min.css',
-  
-  // img
-  '/fluidicon.png',
-  '/og.png',
-  '/black.png',
-  'https://cdn.gitote.in/logo.png',
-  'https://cdn.gitote.in/img/404.png',
-  'https://cdn.gitote.in/logo.svg',
-  'https://cdn.gitote.in/img/500.png',
-  
-  // misc
-  '/favicon.ico',
-];
-
-self.addEventListener('install', function (event) {
-  event.waitUntil(
-    caches.open(STATIC_CACHE)
-      .then(function (cache) {
-        return cache.addAll(urlsToCache);
-      })
-  );
-});
-
-self.addEventListener('fetch', function (event) {
-  event.respondWith(
-    caches.match(event.request)
-      .then(function (response) {
-        if (response) {
-          return response;
-        }
-        return fetch(event.request);
-      }
-      )
-  );
-});

+ 0 - 13
templates/base/head.tmpl

@@ -11,19 +11,6 @@
 	<link rel="fluid-icon" href="{{AppURL}}fluidicon.png" title="Gitote">
 	<link rel="apple-touch-icon" href="{{AppURL}}black.png"/>
 	<link rel="search" type="application/opensearchdescription+xml" href="/search.xml" title="Gitote">
-
-	<script>
-	if ('serviceWorker' in navigator) {
-		window.addEventListener('load', function() {
-			navigator.serviceWorker.register('/serviceworker.js').then(function(registration) {
-				console.log('ServiceWorker registration successful with scope: ', registration.scope);
-				console.log('Gitote 💖\'s web️')
-			}, function(err) {
-				console.log('ServiceWorker registration failed: ', err);
-			});
-		});
-	}
- 	</script>
  	
  	{{template "base/verification" .}}