Unified · Split
| @@ -13,5 +13,6 @@ app.config = · 12 unmodified lines | ||
| 13 | 13 | version: <%= Time.now.to_i %> |
| 14 | 14 | release: <%= Time.now.utc.httpdate.to_json %> |
| 15 | 15 | mathml_stylesheet: '<%= App.cdn_origin %>/mathml.css' |
| 16 | + favicon_spritesheet: '<%= image_path('sprites/docs.png') %>' | |
| 16 | 17 | service_worker_path: '/service-worker.js' |
| 17 | 18 | service_worker_enabled: <%= App.environment == :production || ENV['ENABLE_SERVICE_WORKER'] == 'true' %> |
| @@ -30,8 +30,8 @@ withImage = (url, action) -> · 29 unmodified lines | ||
| 30 | 30 | |
| 31 | 31 | styles = window.getComputedStyle($("._icon-#{doc.slug.split('~')[0]}"), ':before') |
| 32 | 32 | |
| 33 | − bgUrl = styles['background-image'].slice(5, -2) | |
| 34 | − sourceSize = if bgUrl.includes('@2x') then 32 else 16 | |
| 33 | + bgUrl = app.config.favicon_spritesheet | |
| 34 | + sourceSize = 16 | |
| 35 | 35 | sourceX = Math.abs(parseInt(styles['background-position-x'].slice(0, -2))) |
| 36 | 36 | sourceY = Math.abs(parseInt(styles['background-position-y'].slice(0, -2))) |
| 37 | 37 | |