Sha256: f3aae1dcaf9c72bee65c331313d518bc4d5a76e7a41bc7c788dd877a919997a9
Contents?: true
Size: 456 Bytes
Versions: 3
Compression:
Stored size: 456 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').attr('hidden', '') $element.find('.page-expiry--expired').removeAttr('hidden') } } } })(jQuery, window.GOVUK.Modules)
Version data entries
3 entries across 3 versions & 1 rubygems