<commit_before>// jshint devel:true

(function (global) {
  'use strict';

  let Feature = global.WWCD.Feature || require('./feature').WWCD.Feature;

  let features = {
    localNotifications: new Feature({
      id: 'local-notifications',
      icon: 'mdi-notification-system-update',
      name: 'Local notifications',
      description: `Local notifications, available through Notifications API, allow the authorized web applications to draw users attention
       in a bold but standardized fashion. Notifications are generated by the web application running in a browsers' tab to be presented
       to the user outside of the browser tab area.`,
      caniuse: 'notifications',
      supported: Feature.windowContains('Notification'),
      demoPen: 'yYJdWO',
      links: [
        {url: 'https://addons.mozilla.org/en-us/firefox/addon/221523/', ignore: true},
        {url: 'http://www.html5rocks.com/tutorials/notifications/quick/', ignore: true},
        {url: 'http://aurelio.audero.it/demo/web-notifications-api-demo.html', ignore: true}
      ]
    }),

    pushNotifications: new Feature({
      id: 'push-notifications',
      icon: 'mdi-notification-tap-and-play',
      name: 'Push notifications',
      description: [`Remote Push Notifications allow web applications to subscribe the user to the re-engagement mechanism
       that can show a message to the subscriber even if the web application is not currently opened in the browser. This utilizes the powerful concept
       of Service Workers, code units installable by the web app that execute separately in the background.`,
        `Currently works in Chrome only and requires <a href="https://developers.google.com/cloud-messaging/">GCM</a> setup.`],
      caniuse: 'serviceworkers',
      supported: Feature.navigatorContains('serviceWorker') && Feature.windowContains('PushManager') && Feature.containedIn(ServiceWorkerRegistration.prototype, 'showNotification'),
      links: [
        {url: 'http://www.html5rocks.com/en/tutorials/service-worker/introduction/', ignore: true},
        {url: 'https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker_API', ignore: true},
        {url: 'https://jakearchibald.github.io/isserviceworkerready/resources.html', ignore: true},
        {
          url: 'https://developers.google.com/web/updates/2015/03/push-notificatons-on-the-open-web',
          title: 'Push Notifications on the Open Web - Chrome tutorial'
        },
        {url: 'https://goroost.com/try-chrome-push-notifications', title: 'Chrome Push Notifications demo'}
      ]
    }),

    backgroundTasks: new Feature({
      id: 'background-tasks',
      icon: 'mdi-action-settings-applications',
      name: 'Background processing',
      description: `Web applications running on HTTPS can request the browser to install the separate code unit called Service Worker.
       This unit is then run in a separate thread off the owning web application, communicating via events and messages.
       It provides a possibility to execute code regardless of the main application state, i.e. when it is not opened.
       Use cases might include prefetching and caching the data, long processing etc.`,
      caniuse: 'serviceworkers',
      supported: Feature.navigatorContains('serviceWorker'),
      links: [
        {url: 'https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker_API', title: 'ServiceWorker API - MDN docs'},
        {
          url: 'https://googlechrome.github.io/samples/service-worker/prefetch/index.html',
          title: 'Service Worker Sample: Pre-fetching Resources During Registration'
        }
      ]
    }),

    touch: new Feature({
      id: 'touch',
      icon: 'mdi-content-gesture',
      name: 'Touch gestures',
      description: [`Traditionally, web relies on mouse and keyboard as the only input devices, while mobile devices are mostly controlled by touch.
        Mobile web started with a bit touchy solution of translating touch events to mouse events like <code>mousedown</code>.`,
        `Newer HTML5 approach is to embrace touch as the first-class input mean, allowing web applications to intercept and identify complex multitouch gestures,
        free-hand drawing etc. Unfortunately, the support is twofold - either via touch events that were first introduced by Apple and standardized later
        as a de-facto solution, when other vendors went the same route, or via the newer, more general Pointer Events specification.`],
      caniuse: 'touch',
      demoPen: 'LpbVoV',
      supported: Feature.windowContains('ontouchstart'),
      links: [
        {url: 'http://www.html5rocks.com/en/mobile/touch/', title: 'Multi-touch Web Development'}
      ]
    }),

    manifest: new Feature({
      id: 'manifest',
      icon: 'mdi-content-archive',
      name: 'Homescreen installation',
      links: [
        {
          url: 'https://developers.google.com/web/updates/2014/11/Support-for-installable-web-apps-with-webapp-manifest-in-chrome-38-for-Android',
          title: 'Installable Web Apps with the WebApp Manifest in Chrome for Android'
        },
        {url: 'http://html5doctor.com/web-manifest-specification/', title: 'The Web Manifest specification'}
      ]
    }),
    foregroundDetection: new Feature({
      id: 'foreground-detection',
      icon: 'mdi-action-flip-to-front',
      name: 'Foreground detection',
      caniuse: 'pagevisibility',
      supported: Feature.containedIn(global.document, 'visibilityState')
    }),
    geolocation: new Feature({
      id: 'geolocation',
      icon: 'mdi-device-gps-fixed',<commit_msg>manifest, page visibility descriptions<commit_after>// jshint devel:true

(function (global) {
  'use strict';

  let Feature = global.WWCD.Feature || require('./feature').WWCD.Feature;

  let features = {
    localNotifications: new Feature({
      id: 'local-notifications',
      icon: 'mdi-notification-system-update',
      name: 'Local notifications',
      description: `Local notifications, available through <b>Notifications API</b>, allow the authorized web applications to draw users attention
       in a bold but standardized fashion. Notifications are generated by the web application running in a browsers' tab to be presented
       to the user outside of the browser tab area.`,
      caniuse: 'notifications',
      supported: Feature.windowContains('Notification'),
      demoPen: 'yYJdWO',
      links: [
        {url: 'https://addons.mozilla.org/en-us/firefox/addon/221523/', ignore: true},
        {url: 'http://www.html5rocks.com/tutorials/notifications/quick/', ignore: true},
        {url: 'http://aurelio.audero.it/demo/web-notifications-api-demo.html', ignore: true}
      ]
    }),

    pushNotifications: new Feature({
      id: 'push-notifications',
      icon: 'mdi-notification-tap-and-play',
      name: 'Push notifications',
      description: [`Remote Push Notifications allow web applications to subscribe the user to the re-engagement mechanism
       that can show a message to the subscriber even if the web application is not currently opened in the browser. This utilizes the powerful concept
       of <b>Service Workers</b>, code units installable by the web app that execute separately in the background.`,
        `Currently works in Chrome only and requires <a href="https://developers.google.com/cloud-messaging/">GCM</a> setup.`],
      caniuse: 'serviceworkers',
      supported: Feature.navigatorContains('serviceWorker') && Feature.windowContains('PushManager') && Feature.containedIn(ServiceWorkerRegistration.prototype, 'showNotification'),
      links: [
        {url: 'http://www.html5rocks.com/en/tutorials/service-worker/introduction/', ignore: true},
        {url: 'https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker_API', ignore: true},
        {url: 'https://jakearchibald.github.io/isserviceworkerready/resources.html', ignore: true},
        {
          url: 'https://developers.google.com/web/updates/2015/03/push-notificatons-on-the-open-web',
          title: 'Push Notifications on the Open Web - Chrome tutorial'
        },
        {url: 'https://goroost.com/try-chrome-push-notifications', title: 'Chrome Push Notifications demo'}
      ]
    }),

    backgroundTasks: new Feature({
      id: 'background-tasks',
      icon: 'mdi-action-settings-applications',
      name: 'Background processing',
      description: `Web applications running on HTTPS can request the browser to install the separate code unit called <b>Service Worker</b>.
       This unit is then run in a separate thread off the owning web application, communicating via events and messages.
       It provides a possibility to execute code regardless of the main application state, i.e. when it is not opened.
       Use cases might include prefetching and caching the data, long processing etc.`,
      caniuse: 'serviceworkers',
      supported: Feature.navigatorContains('serviceWorker'),
      links: [
        {url: 'https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker_API', title: 'ServiceWorker API - MDN docs'},
        {
          url: 'https://googlechrome.github.io/samples/service-worker/prefetch/index.html',
          title: 'Service Worker Sample: Pre-fetching Resources During Registration'
        }
      ]
    }),

    touch: new Feature({
      id: 'touch',
      icon: 'mdi-content-gesture',
      name: 'Touch gestures',
      description: [`Traditionally, web relies on mouse and keyboard as the only input devices, while mobile devices are mostly controlled by touch.
        Mobile web started with a bit touchy solution of translating touch events to mouse events like <code>mousedown</code>.`,
        `Newer HTML5 approach is to embrace touch as the first-class input mean, allowing web applications to intercept and identify complex multitouch
         gestures, free-hand drawing etc. Unfortunately, the support is twofold - either via touch events like <code>touchstart</code> that were first
         introduced by Apple and standardized later as a de-facto solution, when other vendors went the same route, or via the newer,
         more general <b>Pointer Events</b> specification.`],
      caniuse: 'touch',
      demoPen: 'LpbVoV',
      supported: Feature.windowContains('ontouchstart'),
      links: [
        {url: 'http://www.html5rocks.com/en/mobile/touch/', title: 'Multi-touch Web Development'}
      ]
    }),

    manifest: new Feature({
      id: 'manifest',
      icon: 'mdi-content-archive',
      name: 'Home screen installation',
      description: `Web applications can provide the <code>manifest.json</code> file, standarized as the <b>Web Manifest</b>, specifying the features
       and behaviors needed on order to treat the application as a first-class citizen on the mobile platform, i.e. adding ("installing") to home screen
       with the relevant icon, full screen behaviors, standalone appearance etc.`,
      links: [
        {
          url: 'https://developers.google.com/web/fundamentals/device-access/stickyness/?hl=en',
          title: 'Device Access & Integration: Add To Home Screen'
        },
        {url: 'http://html5doctor.com/web-manifest-specification/', title: 'The Web Manifest specification'}
      ]
    }),

    foregroundDetection: new Feature({
      id: 'foreground-detection',
      icon: 'mdi-action-flip-to-front',
      name: 'Foreground detection',
      description: `<b>Page Visibility API</b> is useful for the web application to know whether it is currently displayed on the front or not, especially to stop
        resource-intensive UI animations or data refreshing when it's not needed. On the mobile devices, the primary reason for that is to reduce battery usage.`,
      caniuse: 'pagevisibility',
      demoPen: 'avBpOb',
      supported: Feature.containedIn(global.document, 'visibilityState')
    }),

    geolocation: new Feature({
      id: 'geolocation',
      icon: 'mdi-device-gps-fixed',
{'fraction_non_alphanumeric': 0.10805385966379527, 'fraction_numerical': 0.0035125867692565025, 'mean_word_length': 3.2165021156558535, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 18, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '81084', 'n_tokens_mistral': 3302, 'n_tokens_neox': 3166, 'n_words': 1063}