diff options
author | Chris Mytton <chrism@mysociety.org> | 2020-05-13 15:50:16 +0100 |
---|---|---|
committer | Chris Mytton <chrism@mysociety.org> | 2020-05-13 15:50:16 +0100 |
commit | f749f9ec30165bbe1d97410e070e4acc92d8eb33 (patch) | |
tree | eaf933b5ed3146bcc8699086b3407551953f875d | |
parent | c80f13eeac448e99873b690411d7f6e83b07dd06 (diff) | |
parent | 92bc41ffea83a39ce582f7c445d03c092125dcf5 (diff) |
Merge branch 'dynamic-year-in-map-copyrights'
-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); |