Sha256: 6d058d14546dc2ebf959972a7caba1c3b7a66846d986ee866cdb51262ec6a222

Contents?: true

Size: 437 Bytes

Versions: 17

Compression:

Stored size: 437 Bytes

Contents

(function($, Modules) {
  'use strict';

  Modules.PageExpiry = function PageExpiry() {
    this.start = function start($element) {
      var rawDate = $element.data('last-reviewed-on');
      var isExpired = Date.parse(rawDate) < new Date();

      if (isExpired) {
        $element.find('.page-expiry--not-expired').hide(0);
        $element.find('.page-expiry--expired').show(0);
      }
    };
  };
})(jQuery, window.GOVUK.Modules);

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
govuk_tech_docs-1.8.3 lib/assets/javascripts/_modules/page-expiry.js
dss_tech_docs-0.1.2 lib/assets/javascripts/_modules/page-expiry.js
dss_tech_docs-0.1.1 lib/assets/javascripts/_modules/page-expiry.js
dss_tech_docs-0.1.0 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.8.2 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.8.1 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.8.0 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.7.0 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.6.3 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.6.2 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.6.1 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.6.0 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.5.0 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.4.0 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.3.1 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.3.0 lib/assets/javascripts/_modules/page-expiry.js
govuk_tech_docs-1.2.0 lib/assets/javascripts/_modules/page-expiry.js