aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-fms.js
diff options
context:
space:
mode:
authorChris Mytton <chrism@mysociety.org>2020-05-12 14:19:15 +0100
committerChris Mytton <chrism@mysociety.org>2020-05-12 14:19:43 +0100
commit92bc41ffea83a39ce582f7c445d03c092125dcf5 (patch)
tree1aa0a9df6a214e567b5686419ac6e6949cf56b24 /web/js/map-fms.js
parent08f4e0171579f77165ce074e88086d1caeb7a243 (diff)
Make year in map copyright notices dynamic
Diffstat (limited to 'web/js/map-fms.js')
-rw-r--r--web/js/map-fms.js7
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 &copy; Crown copyright and database right 2016';
+ copyrights = 'Contains Highways England and Ordnance Survey data &copy; 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 = '&copy; 2016 <a href="https://www.bing.com/maps/">Microsoft</a>. &copy; AND, Navteq, Highways England, Ordnance Survey';
+ copyrights = '&copy; ' + year + ' <a href="https://www.bing.com/maps/">Microsoft</a>. &copy; AND, Navteq, Highways England, Ordnance Survey';
} else {
- copyrights = '&copy; 2016 <a href="https://www.bing.com/maps/">Microsoft</a>. &copy; AND, Navteq, Ordnance Survey';
+ copyrights = '&copy; ' + year + ' <a href="https://www.bing.com/maps/">Microsoft</a>. &copy; AND, Navteq, Ordnance Survey';
}
}
this._updateAttribution(copyrights, logo);