diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee
index 2b76a732..3418ad2f 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -203,7 +203,7 @@ credits = [
'https://raw.githubusercontent.com/apache/cordova-docs/master/LICENSE'
], [
'CSS
DOM
HTTP
HTML
JavaScript
SVG
XPath',
- '2005-2017 Mozilla Developer Network and individual contributors',
+ '2005-2020 Mozilla and individual contributors',
'CC BY-SA',
'https://creativecommons.org/licenses/by-sa/2.5/'
], [
diff --git a/lib/docs/scrapers/mdn/mdn.rb b/lib/docs/scrapers/mdn/mdn.rb
index defb4533..31568fc7 100644
--- a/lib/docs/scrapers/mdn/mdn.rb
+++ b/lib/docs/scrapers/mdn/mdn.rb
@@ -17,18 +17,20 @@ module Docs
}
options[:attribution] = <<-HTML
- © 2005–2018 Mozilla Developer Network and individual contributors.
+ © 2005–2020 Mozilla and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
HTML
def get_latest_version(opts)
json = fetch_json("https://developer.mozilla.org/en-US/docs/feeds/json/tag/#{options[:mdn_tag]}", opts)
- DateTime.parse(json[0]['pubdate']).to_time.to_i
+ dates = json.map { |i| i['pubdate'] }
+ DateTime.parse(dates.max).to_time.to_i
end
private
def process_response?(response)
+ response.effective_url.host = 'developer.mozilla.org' if response.effective_url.host == 'wiki.developer.mozilla.org'
super && response.effective_url.query == 'raw=1¯os=1'
end
end
diff --git a/lib/docs/scrapers/mdn/xslt_xpath.rb b/lib/docs/scrapers/mdn/xslt_xpath.rb
index 9bf01c01..359eb755 100644
--- a/lib/docs/scrapers/mdn/xslt_xpath.rb
+++ b/lib/docs/scrapers/mdn/xslt_xpath.rb
@@ -15,10 +15,7 @@ module Docs
options[:only_patterns] = [/\A\/XSLT/, /\A\/XPath/]
options[:fix_urls] = ->(url) do
- url.sub! 'https://developer.mozilla.org/en/XPath', "#{XsltXpath.base_url}/XPath"
- url.sub! 'https://developer.mozilla.org/en/XSLT', "#{XsltXpath.base_url}/XSLT"
- url.sub! 'https://developer.mozilla.org/en-US/docs/XPath', "#{XsltXpath.base_url}/XPath"
- url.sub! 'https://developer.mozilla.org/en-US/docs/XSLT', "#{XsltXpath.base_url}/XSLT"
+ url.sub! 'https://developer.mozilla.org/en-US/docs/Web/XSLT/Element', "#{XsltXpath.base_url}/XSLT"
url
end
end