Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: globals/get_browser_versions.py

Issue 29722659: Fixes #36 - Adjusted heading font-sizes and line-heights (Closed) Base URL: https://hg.adblockplus.org/web.adblockplus.org
Patch Set: Created March 14, 2018, 1:33 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | includes/as-mentioned.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: globals/get_browser_versions.py
===================================================================
--- a/globals/get_browser_versions.py
+++ b/globals/get_browser_versions.py
@@ -8,16 +8,18 @@
import time
from xml.dom import minidom
from jinja2 import contextfunction
BROWSERS = {}
BASE_URL = 'https://product-details.mozilla.org/1.0'
FIREFOX_URL = BASE_URL + '/firefox_versions.json'
+THUNDERBIRD_URL = BASE_URL + '/thunderbird_versions.json'
+SEAMONKEY_URL = 'http://www.seamonkey-project.org/seamonkey_versions.json'
CHROME_URL = 'https://omahaproxy.appspot.com/all.json?os=win'
cache = {}
def get_json_versions(product_url):
response = urllib.urlopen(product_url)
try:
@@ -40,17 +42,46 @@
return {
'current': versions['LATEST_FIREFOX_VERSION'],
'unreleased': [
versions['LATEST_FIREFOX_DEVEL_VERSION'],
versions['FIREFOX_NIGHTLY'],
]
}
+
+def get_thunderbird_versions():
+ tbird_versions = get_json_versions(THUNDERBIRD_URL)
+ firefox_versions = get_json_versions(FIREFOX_URL)
+ return {
+ 'current': tbird_versions['LATEST_THUNDERBIRD_VERSION'],
+ 'unreleased': [
+ tbird_versions['LATEST_THUNDERBIRD_DEVEL_VERSION'],
+ tbird_versions['LATEST_THUNDERBIRD_ALPHA_VERSION'],
+ firefox_versions['FIREFOX_NIGHTLY'],
+ ]
+ }
+
BROWSERS['firefox'] = lambda: get_firefox_versions()
+BROWSERS['thunderbird'] = lambda: get_thunderbird_versions()
+
+
+def get_seamonkey_versions():
+ seamonkey_versions = get_json_versions(SEAMONKEY_URL)
+ versions = {
+ 'current': seamonkey_versions['LATEST_SEAMONKEY_VERSION'],
+ 'unreleased': [
+ seamonkey_versions['LATEST_SEAMONKEY_MILESTONE_VERSION'],
+ seamonkey_versions['LATEST_SEAMONKEY_DEVEL_VERSION'],
+ ]
+ }
+
+ return versions
+
+BROWSERS['seamonkey'] = get_seamonkey_versions
def get_chrome_versions():
response = urllib.urlopen(CHROME_URL)
try:
data = json.load(response)
finally:
response.close()
« no previous file with comments | « no previous file | includes/as-mentioned.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld