Unified · Split
| @@ -15,7 +15,7 @@ · 14 unmodified lines | ||
| 15 | 15 | @el = $('._app') |
| 16 | 16 | @localStorage = new LocalStorageStore |
| 17 | 17 | @appCache = new app.AppCache if app.AppCache.isEnabled() |
| 18 | − @settings = new app.Settings @localStorage | |
| 18 | + @settings = new app.Settings | |
| 19 | 19 | @db = new app.DB() |
| 20 | 20 | |
| 21 | 21 | @docs = new app.collections.Docs |
| @@ -106,7 +106,6 @@ · 84 unmodified lines | ||
| 106 | 106 | @hideLoading() |
| 107 | 107 | @welcomeBack() unless @doc |
| 108 | 108 | @removeEvent 'ready bootError' |
| 109 | − try navigator.mozApps?.getSelf().onsuccess = -> app.mozApp = true catch | |
| 110 | 109 | return |
| 111 | 110 | |
| 112 | 111 | initDoc: (doc) -> |
| @@ -117,12 +116,7 @@ · 4 unmodified lines | ||
| 117 | 116 | migrateDocs: -> |
| 118 | 117 | for slug in @settings.getDocs() when not @docs.findBy('slug', slug) |
| 119 | 118 | needsSaving = true |
| 120 | − doc = @disabledDocs.findBy('slug', 'codeigniter~3') if slug == 'codeigniter~3.0' | |
| 121 | − doc = @disabledDocs.findBy('slug', 'node~4_lts') if slug == 'node~4.2_lts' | |
| 122 | − doc = @disabledDocs.findBy('slug', 'xslt_xpath') if slug == 'xpath' | |
| 123 | − doc = @disabledDocs.findBy('slug', 'angular~2_typescript') if slug == 'angular~2.0_typescript' | |
| 124 | − doc = @disabledDocs.findBy('slug', "angularjs~#{match[1]}") if match = /^angular~(1\.\d)$/.exec(slug) | |
| 125 | − doc ||= @disabledDocs.findBy('slug_without_version', slug) | |
| 119 | + doc = @disabledDocs.findBy('slug_without_version', slug) | |
| 126 | 120 | if doc |
| 127 | 121 | @disabledDocs.remove(doc) |
| 128 | 122 | @docs.add(doc) |
| @@ -13,21 +13,8 @@ class app.Settings · 12 unmodified lines | ||
| 13 | 13 | manualUpdate: false |
| 14 | 14 | schema: 1 |
| 15 | 15 | |
| 16 | − constructor: (legacyStore) -> | |
| 16 | + constructor: -> | |
| 17 | 17 | @store = new CookieStore |
| 18 | − @importLegacyValues(legacyStore) | |
| 19 | − | |
| 20 | − importLegacyValues: (legacyStore) -> | |
| 21 | − return unless settings = legacyStore.get('settings') | |
| 22 | − for key, value of settings | |
| 23 | − if key == 'autoUpdate' | |
| 24 | − key = 'manualUpdate' | |
| 25 | − value = !value | |
| 26 | − else if key == 'tips' | |
| 27 | − value = value.join('/') | |
| 28 | − @store.set(key, value) | |
| 29 | − legacyStore.del('settings') | |
| 30 | − return | |
| 31 | 18 | |
| 32 | 19 | set: (key, value) -> |
| 33 | 20 | @store.set(key, value) |
| @@ -90,9 +90,6 @@ · 89 unmodified lines | ||
| 90 | 90 | "2015-07-26", |
| 91 | 91 | "Added search abbreviations (e.g. <code class=\"_label\">$</code> is an alias for <code class=\"_label\">jQuery</code>).\n<a href=\"/help#abbreviations\">Click here</a> to see the full list. Feel free to suggest more on <a href=\"https://github.com/Thibaut/devdocs/issues/new\" target=\"_blank\" rel=\"noopener\">GitHub</a>.", |
| 92 | 92 | "Added <code class=\"_label\">shift + ↓/↑</code> shortcut for scrolling (same as <code class=\"_label\">alt + ↓/↑</code>)." |
| 93 | − ], [ | |
| 94 | − "2015-07-12", | |
| 95 | − "New sponsors: <a href=\"http://out.devdocs.io/s/jetbrains\">JetBrains</a> and <a href=\"http://out.devdocs.io/s/code-school\">Code School</a>\nIf you like DevDocs, please take a moment to check out their products — they're awesome!" | |
| 96 | 93 | ], [ |
| 97 | 94 | "2015-07-05", |
| 98 | 95 | "New documentations: <a href=\"/drupal/\">Drupal</a>, <a href=\"/vue/\">Vue.js</a>, <a href=\"/phaser/\">Phaser</a> and <a href=\"/webpack/\">webpack</a>" |
| @@ -42,8 +42,6 @@ app.templates.offlinePage = (docs) -> """ · 41 unmodified lines | ||
| 42 | 42 | canICloseTheTab = -> |
| 43 | 43 | if app.AppCache.isEnabled() |
| 44 | 44 | """ Yes! Even offline, you can open a new tab, go to <a href="//devdocs.io">devdocs.io</a>, and everything will work as if you were online (provided you installed all the documentations you want to use beforehand). """ |
| 45 | − else if app.mozApp | |
| 46 | − """ Yes! Even offline, you can open the app and everything will work as if you were online (provided you installed all the documentations you want to use beforehand). """ | |
| 47 | 45 | else |
| 48 | 46 | """ No. AppCache isn't available in your browser (or is disabled) so loading <a href="//devdocs.io">devdocs.io</a> offline won't work.<br> |
| 49 | 47 | The current tab will continue to work, though (provided you installed all the documentations you want to use beforehand). """ |