Front end of the Slack clone application.

options.js 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. Copyright 2015 Google Inc. All Rights Reserved.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. 'use strict';
  14. // TODO: This is necessary to handle different implementations in the wild
  15. // The spec defines self.registration, but it was not implemented in Chrome 40.
  16. var scope;
  17. if (self.registration) {
  18. scope = self.registration.scope;
  19. } else {
  20. scope = self.scope || new URL('./', self.location).href;
  21. }
  22. module.exports = {
  23. cache: {
  24. name: '$$$toolbox-cache$$$' + scope + '$$$',
  25. maxAgeSeconds: null,
  26. maxEntries: null
  27. },
  28. debug: false,
  29. networkTimeoutSeconds: null,
  30. preCacheItems: [],
  31. // A regular expression to apply to HTTP response codes. Codes that match
  32. // will be considered successes, while others will not, and will not be
  33. // cached.
  34. successResponses: /^0|([123]\d\d)|(40[14567])|410$/
  35. };