History

Update browser requirements

Thibaut Courouble committed 8 years ago

Commit 847cfbb1 parent 01bc3184 files · +13 −28Browse files

Unified · Split

4 files
  1. README.md +4 −8
  2. assets/javascripts/app/app.coffee +1 −6
  3. assets/javascripts/templates/error_tmpl.coffee +4 −7
  4. views/unsupported.erb +4 −7
README.md+4−8
@@ -64,14 +64,10 @@ Another driving factor is performance and the fact that everything happens in th · 63 unmodified lines
64 64
65DevDocs being a developer tool, the browser requirements are high:65DevDocs being a developer tool, the browser requirements are high:
66 66
671. On the desktop:67* Recent versions of Firefox, Chrome, or Opera
68 * Recent version of Chrome, Firefox, or Opera68* Safari 9.1+
69 * Safari 8+69* Edge 16+
70 * IE / Edge 10+70* iOS 10+
712. On mobile:
72 * iOS 8+
73 * Android 4.1+
74 * Windows Phone 8+
75 71
76This allows the code to take advantage of the latest DOM and HTML5 APIs and make developing DevDocs a lot more fun!72This allows the code to take advantage of the latest DOM and HTML5 APIs and make developing DevDocs a lot more fun!
77 73
assets/javascripts/app/app.coffee+1−6
@@ -245,7 +245,7 @@ · 244 unmodified lines
245 matchMedia: !!window.matchMedia245 matchMedia: !!window.matchMedia
246 insertAdjacentHTML: !!document.body.insertAdjacentHTML246 insertAdjacentHTML: !!document.body.insertAdjacentHTML
247 defaultPrevented: document.createEvent('CustomEvent').defaultPrevented is false247 defaultPrevented: document.createEvent('CustomEvent').defaultPrevented is false
248 cssGradients: supportsCssGradients()248 cssVariables: CSS.supports and CSS.supports('--t:0')
249 249
250 for key, value of features when not value250 for key, value of features when not value
251 Raven.captureMessage "unsupported/#{key}", level: 'info'251 Raven.captureMessage "unsupported/#{key}", level: 'info'
@@ -268,9 +268,4 @@ · 16 unmodified lines
268 isInvalidLocation: ->268 isInvalidLocation: ->
269 @config.env is 'production' and location.host.indexOf(app.config.production_host) isnt 0269 @config.env is 'production' and location.host.indexOf(app.config.production_host) isnt 0
270 270
271supportsCssGradients = ->
272 el = document.createElement('div')
273 el.style.cssText = "background-image: -webkit-linear-gradient(top, #000, #fff); background-image: linear-gradient(to top, #000, #fff);"
274 el.style.backgroundImage.indexOf('gradient') >= 0
275
276$.extend app, Events271$.extend app, Events
assets/javascripts/templates/error_tmpl.coffee+4−7
@@ -56,13 +56,10 @@ app.templates.unsupportedBrowser = """ · 55 unmodified lines
56 <h1 class="_fail-title">Your browser is unsupported, sorry.</h1>56 <h1 class="_fail-title">Your browser is unsupported, sorry.</h1>
57 <p class="_fail-text">DevDocs is an API documentation browser which supports the following browsers:57 <p class="_fail-text">DevDocs is an API documentation browser which supports the following browsers:
58 <ul class="_fail-list">58 <ul class="_fail-list">
59 <li>Recent versions of Chrome and Firefox59 <li>Recent versions of Firefox, Chrome, or Opera
60 <li>Safari 5.1+60 <li>Safari 9.1+
61 <li>Opera 12.1+61 <li>Edge 16+
62 <li>Internet Explorer 10+62 <li>iOS 10+
63 <li>iOS 6+
64 <li>Android 4.1+
65 <li>Windows Phone 8+
66 </ul>63 </ul>
67 <p class="_fail-text">64 <p class="_fail-text">
68 If you're unable to upgrade, I apologize.65 If you're unable to upgrade, I apologize.
views/unsupported.erb+4−7
@@ -10,13 +10,10 @@ · 9 unmodified lines
10 <h1 class="_fail-title">Your browser is unsupported, sorry.</h1>10 <h1 class="_fail-title">Your browser is unsupported, sorry.</h1>
11 <p class="_fail-text">DevDocs is an API documentation browser which supports the following browsers:</p>11 <p class="_fail-text">DevDocs is an API documentation browser which supports the following browsers:</p>
12 <ul class="_fail-list">12 <ul class="_fail-list">
13 <li>Recent versions of Chrome and Firefox</li>13 <li>Recent versions of Firefox, Chrome, or Opera</li>
14 <li>Safari 5.1+</li>14 <li>Safari 9.1+</li>
15 <li>Opera 12.1+</li>15 <li>Edge 16+</li>
16 <li>Internet Explorer 10+</li>16 <li>iOS 10+</li>
17 <li>iOS 6+</li>
18 <li>Android 4.1+</li>
19 <li>Windows Phone 8+</li>
20 </ul>17 </ul>
21 <p class="_fail-text">18 <p class="_fail-text">
22 If you're unable to upgrade, I apologize.19 If you're unable to upgrade, I apologize.