diff options
author | Chris Mytton <chrism@mysociety.org> | 2020-05-12 14:19:15 +0100 |
---|---|---|
committer | Chris Mytton <chrism@mysociety.org> | 2020-05-12 14:19:43 +0100 |
commit | 92bc41ffea83a39ce582f7c445d03c092125dcf5 (patch) | |
tree | 1aa0a9df6a214e567b5686419ac6e6949cf56b24 /web/js/map-fms.js | |
parent | 08f4e0171579f77165ce074e88086d1caeb7a243 (diff) |
Make year in map copyright notices dynamic
Diffstat (limited to 'web/js/map-fms.js')
-rw-r--r-- | web/js/map-fms.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/web/js/map-fms.js b/web/js/map-fms.js index ac27cfbce..925fe1fa2 100644 --- a/web/js/map-fms.js +++ b/web/js/map-fms.js @@ -38,14 +38,15 @@ OpenLayers.Layer.BingUK = OpenLayers.Class(OpenLayers.Layer.Bing, { var logo = ''; var c = this.map.getCenter(); var in_uk = c ? this.in_uk(c) : true; + var year = (new Date()).getFullYear(); if (z >= 16 && in_uk) { - copyrights = 'Contains Highways England and Ordnance Survey data © Crown copyright and database right 2016'; + copyrights = 'Contains Highways England and Ordnance Survey data © Crown copyright and database right ' + year; } else { logo = '<a href="https://www.bing.com/maps/"><img border=0 src="//dev.virtualearth.net/Branding/logo_powered_by.png"></a>'; if (in_uk) { - copyrights = '© 2016 <a href="https://www.bing.com/maps/">Microsoft</a>. © AND, Navteq, Highways England, Ordnance Survey'; + copyrights = '© ' + year + ' <a href="https://www.bing.com/maps/">Microsoft</a>. © AND, Navteq, Highways England, Ordnance Survey'; } else { - copyrights = '© 2016 <a href="https://www.bing.com/maps/">Microsoft</a>. © AND, Navteq, Ordnance Survey'; + copyrights = '© ' + year + ' <a href="https://www.bing.com/maps/">Microsoft</a>. © AND, Navteq, Ordnance Survey'; } } this._updateAttribution(copyrights, logo); |