mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-18 00:55:35 +00:00
* relocate .vscode
* Switch to transloadit linter
* Update .eslintrc.json
* autofix code
* unlink and install eslint-config-transloadit@1.1.1
* Change 0 to "off"
* Don't change 'use strict'
* Do not vertically align
* disable key-spacing
* add import/no-extraneous-dependencies per package
* add more react/a11y warnings
* Revert "autofix code"
This reverts commit 14c8a8cde8.
* add import/no-extraneous-dependencies per example and main package
* autofix code (2)
* Allow devDependencies in ./bin
* Change import/no-extraneous-dependencies to warn again
* upgrade linter
* Set import/no-extraneous-dependencies to warn
24 lines
684 B
JavaScript
24 lines
684 B
JavaScript
// Polyfills, primarily for testing in IE11
|
|
require('es6-promise/auto')
|
|
require('whatwg-fetch')
|
|
|
|
const DragDrop = require('./DragDrop.js')
|
|
const Dashboard = require('./Dashboard.js')
|
|
|
|
switch (window.location.pathname.toLowerCase()) {
|
|
case '/':
|
|
case '/dashboard.html': Dashboard(); break
|
|
case '/dragdrop.html': DragDrop(); break
|
|
}
|
|
|
|
if ('serviceWorker' in navigator) {
|
|
// eslint-disable-next-line compat/compat
|
|
navigator.serviceWorker
|
|
.register('/sw.js')
|
|
.then((registration) => {
|
|
console.log('ServiceWorker registration successful with scope: ', registration.scope)
|
|
})
|
|
.catch((error) => {
|
|
console.log(`Registration failed with ${error}`)
|
|
})
|
|
}
|