mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-12 11:20:02 +01:00
changes (#704)
This commit is contained in:
@@ -15,7 +15,7 @@ module.exports = function(grunt) {
|
|||||||
livereload: true
|
livereload: true
|
||||||
},
|
},
|
||||||
source: {
|
source: {
|
||||||
files: ["src/**/*", "Gruntfile.js"],
|
files: ["src/**/*", "Gruntfile.js", "examples/lib/*","examples/demo.js"],
|
||||||
tasks: ["build:js"]
|
tasks: ["build:js"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -53,6 +53,6 @@ module.exports = function(grunt) {
|
|||||||
|
|
||||||
/* Default (development): Watch files and build on change. */
|
/* Default (development): Watch files and build on change. */
|
||||||
grunt.registerTask("default", ["watch"]);
|
grunt.registerTask("default", ["watch"]);
|
||||||
grunt.registerTask("build", ["browserify:dist", "uglify:dist"]);
|
grunt.registerTask("build", ["browserify:dist","browserify:js","uglify:dist","uglify:js"]);
|
||||||
grunt.registerTask("serve", ["browserify:dist","browserify:js","uglify:dist","uglify:js","browserSync", "watch"]);
|
grunt.registerTask("serve", ["browserify:dist","browserify:js","uglify:dist","uglify:js","browserSync", "watch"]);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
$(document).ready(function($){
|
|
||||||
$(function(){
|
|
||||||
$(window).scroll(function(){
|
|
||||||
if ($(this).scrollTop() > 100){
|
|
||||||
$('.move-up').fadeIn();
|
|
||||||
} else {
|
|
||||||
$('.move-up').fadeOut();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('.move-up button').click(function(){
|
|
||||||
$('body,html').animate({
|
|
||||||
scrollTop: 0
|
|
||||||
}, 800);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
const staticCacheName = 'image-sequencer-static-v3';
|
|
||||||
|
|
||||||
self.addEventListener('install', event => {
|
|
||||||
console.log('Attempting to install service worker');
|
|
||||||
});
|
|
||||||
|
|
||||||
self.addEventListener('activate', function(e) {
|
|
||||||
console.log('[ServiceWorker] Activate');
|
|
||||||
e.waitUntil(
|
|
||||||
caches.keys().then(function(cacheNames) {
|
|
||||||
return Promise.all(
|
|
||||||
cacheNames.filter(function(cacheName){
|
|
||||||
return cacheName.startsWith('image-sequencer-') &&
|
|
||||||
cacheName != staticCacheName;
|
|
||||||
}).map(function(cacheName){
|
|
||||||
return caches.delete(cacheName);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
self.addEventListener('fetch', function(event) {
|
|
||||||
event.respondWith(
|
|
||||||
caches.open(staticCacheName).then(function(cache) {
|
|
||||||
return cache.match(event.request).then(function (response) {
|
|
||||||
return response || fetch(event.request).then(function(response) {
|
|
||||||
if(event.request.method == "GET")
|
|
||||||
cache.put(event.request, response.clone());
|
|
||||||
return response;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})
|
|
||||||
);
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user