History

Add rel="noopener" to external links

Thibaut Courouble committed 10 years ago

Commit 175308b1 parent 41496045 files · +13 −11Browse files

Unified · Split

5 files
  1. assets/javascripts/lib/util.coffee +3 −1
  2. assets/javascripts/news.json +5 −5
  3. assets/javascripts/templates/notif_tmpl.coffee +3 −3
  4. assets/javascripts/templates/pages/root_tmpl.coffee.erb +1 −1
  5. assets/javascripts/templates/sidebar_tmpl.coffee +1 −1
assets/javascripts/lib/util.coffee+3−1
@@ -321,7 +321,9 @@ $.framify = (fn, obj) -> · 320 unmodified lines
321$.noop = ->321$.noop = ->
322 322
323$.popup = (value) ->323$.popup = (value) ->
324 open value.href or value, '_blank'324 win = window.open()
325 win.opener = null if win.opener
326 win.location = value.href or value
325 return327 return
326 328
327$.isTouchScreen = ->329$.isTouchScreen = ->
assets/javascripts/news.json+5−5
@@ -43,7 +43,7 @@ · 42 unmodified lines
43 "New documentations: <a href=\"/erlang/\">Erlang</a> and <a href=\"/tcl_tk/\">Tcl/Tk</a>"43 "New documentations: <a href=\"/erlang/\">Erlang</a> and <a href=\"/tcl_tk/\">Tcl/Tk</a>"
44 ], [44 ], [
45 "2016-01-24",45 "2016-01-24",
46 "&ldquo;Multi-version support&rdquo; has landed!\nClick <a href=\"#\" data-pick-docs>Select documentation</a> to pick which versions to use. More versions will be added in the coming weeks.\nIf you notice any bugs, please report them on <a href=\"https://github.com/Thibaut/devdocs/issues\" target=\"_blank\">GitHub</a>."46 "&ldquo;Multi-version support&rdquo; has landed!\nClick <a href=\"#\" data-pick-docs>Select documentation</a> to pick which versions to use. More versions will be added in the coming weeks.\nIf you notice any bugs, please report them on <a href=\"https://github.com/Thibaut/devdocs/issues\" target=\"_blank\" rel=\"noopener\">GitHub</a>."
47 ], [47 ], [
48 "2015-11-22",48 "2015-11-22",
49 "New documentations: <a href=\"/phoenix/\">Phoenix</a>, <a href=\"/dojo/\">Dojo</a>, <a href=\"/relay/\">Relay</a> and <a href=\"/flow/\">Flow</a>"49 "New documentations: <a href=\"/phoenix/\">Phoenix</a>, <a href=\"/dojo/\">Dojo</a>, <a href=\"/relay/\">Relay</a> and <a href=\"/flow/\">Flow</a>"
@@ -67,7 +67,7 @@ · 17 unmodified lines
67 "New documentations: <a href=\"/q/\">Q</a> and <a href=\"/opentsdb/\">OpenTSDB</a>"67 "New documentations: <a href=\"/q/\">Q</a> and <a href=\"/opentsdb/\">OpenTSDB</a>"
68 ], [68 ], [
69 "2015-07-26",69 "2015-07-26",
70 "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\">GitHub</a>.",70 "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>.",
71 "Added <code class=\"_label\">shift + &darr;/&uarr;</code> shortcut for scrolling (same as <code class=\"_label\">alt + &darr;/&uarr;</code>)."71 "Added <code class=\"_label\">shift + &darr;/&uarr;</code> shortcut for scrolling (same as <code class=\"_label\">alt + &darr;/&uarr;</code>)."
72 ], [72 ], [
73 "2015-07-12",73 "2015-07-12",
@@ -96,10 +96,10 @@ · 22 unmodified lines
96 "New <a href=\"/iojs/\">io.js</a>, <a href=\"/symfony/\">Symfony</a>, <a href=\"/clojure/\">Clojure</a>, <a href=\"/lua/\">Lua</a> and <a href=\"/yii1/\">Yii 1.1</a> documentations"96 "New <a href=\"/iojs/\">io.js</a>, <a href=\"/symfony/\">Symfony</a>, <a href=\"/clojure/\">Clojure</a>, <a href=\"/lua/\">Lua</a> and <a href=\"/yii1/\">Yii 1.1</a> documentations"
97 ], [97 ], [
98 "2015-02-08",98 "2015-02-08",
99 "New dark theme\nClick the icon in the bottom left corner to activate.\n<a href=\"https://github.com/Thibaut/devdocs/issues\" target=\"_blank\">Feedback</a> welcome :)"99 "New dark theme\nClick the icon in the bottom left corner to activate.\n<a href=\"https://github.com/Thibaut/devdocs/issues\" target=\"_blank\" rel=\"noopener\">Feedback</a> welcome :)"
100 ], [100 ], [
101 "2015-01-13",101 "2015-01-13",
102 "<a href=\"/offline\">Offline mode</a> has landed!\nIf you notice any bugs, please report them on <a href=\"https://github.com/Thibaut/devdocs/issues\" target=\"_blank\">GitHub</a>."102 "<a href=\"/offline\">Offline mode</a> has landed!\nIf you notice any bugs, please report them on <a href=\"https://github.com/Thibaut/devdocs/issues\" target=\"_blank\" rel=\"noopener\">GitHub</a>."
103 ], [103 ], [
104 "2014-12-21",104 "2014-12-21",
105 "New <a href=\"/react/\">React</a>, <a href=\"/rethinkdb/\">RethinkDB</a>, <a href=\"/socketio/\">Socket.IO</a>, <a href=\"/modernizr/\">Modernizr</a> and <a href=\"/bower/\">Bower</a> documentations"105 "New <a href=\"/react/\">React</a>, <a href=\"/rethinkdb/\">RethinkDB</a>, <a href=\"/socketio/\">Socket.IO</a>, <a href=\"/modernizr/\">Modernizr</a> and <a href=\"/bower/\">Bower</a> documentations"
@@ -111,7 +111,7 @@ · 5 unmodified lines
111 "New <a href=\"/python2/\">Python 2</a> documentation"111 "New <a href=\"/python2/\">Python 2</a> documentation"
112 ], [112 ], [
113 "2014-11-09",113 "2014-11-09",
114 "New design\nFeedback welcome on <a href=\"https://twitter.com/DevDocs\" target=\"_blank\">Twitter</a> and <a href=\"https://github.com/Thibaut/devdocs\" target=\"_blank\">GitHub</a>."114 "New design\nFeedback welcome on <a href=\"https://twitter.com/DevDocs\" target=\"_blank\" rel=\"noopener\">Twitter</a> and <a href=\"https://github.com/Thibaut/devdocs\" target=\"_blank\" rel=\"noopener\">GitHub</a>."
115 ], [115 ], [
116 "2014-10-19",116 "2014-10-19",
117 "New <a href=\"/svg/\">SVG</a>, <a href=\"/marionette/\">Marionette.js</a>, and <a href=\"/mongoose/\">Mongoose</a> documentations"117 "New <a href=\"/svg/\">SVG</a>, <a href=\"/marionette/\">Marionette.js</a>, and <a href=\"/mongoose/\">Mongoose</a> documentations"
assets/javascripts/templates/notif_tmpl.coffee+3−3
@@ -13,7 +13,7 @@ app.templates.notifError = -> · 12 unmodified lines
13 textNotif """ Oops, an error occured. """,13 textNotif """ Oops, an error occured. """,
14 """ Try <a href="#" data-behavior="hard-reload">reloading</a>, and if the problem persists,14 """ Try <a href="#" data-behavior="hard-reload">reloading</a>, and if the problem persists,
15 <a href="#" data-behavior="reset">resetting the app</a>.<br>15 <a href="#" data-behavior="reset">resetting the app</a>.<br>
16 You can also report this issue on <a href="https://github.com/Thibaut/devdocs/issues/new" target="_blank">GitHub</a>. """16 You can also report this issue on <a href="https://github.com/Thibaut/devdocs/issues/new" target="_blank" rel="noopener">GitHub</a>. """
17 17
18app.templates.notifQuotaExceeded = ->18app.templates.notifQuotaExceeded = ->
19 textNotif """ The offline database has exceeded its size limitation. """,19 textNotif """ The offline database has exceeded its size limitation. """,
@@ -51,8 +51,8 @@ app.templates.notifUpdates = (docs, disabledDocs) -> · 31 unmodified lines
51app.templates.notifShare = ->51app.templates.notifShare = ->
52 textNotif """ Hi there! """,52 textNotif """ Hi there! """,
53 """ Like DevDocs? Help us reach more developers by sharing the link with your friends on53 """ Like DevDocs? Help us reach more developers by sharing the link with your friends on
54 <a href="http://out.devdocs.io/s/tw" target="_blank">Twitter</a>, <a href="http://out.devdocs.io/s/fb" target="_blank">Facebook</a>,54 <a href="http://out.devdocs.io/s/tw" target="_blank" rel="noopener">Twitter</a>, <a href="http://out.devdocs.io/s/fb" target="_blank" rel="noopener">Facebook</a>,
55 <a href="http://out.devdocs.io/s/re" target="_blank">Reddit</a>, etc.<br>Thanks :) """55 <a href="http://out.devdocs.io/s/re" target="_blank" rel="noopener">Reddit</a>, etc.<br>Thanks :) """
56 56
57app.templates.notifUpdateDocs = ->57app.templates.notifUpdateDocs = ->
58 textNotif """ Documentation updates available. """,58 textNotif """ Documentation updates available. """,
assets/javascripts/templates/pages/root_tmpl.coffee.erb+1−1
@@ -79,6 +79,6 @@ app.templates.androidWarning = """ · 78 unmodified lines
79 <h2 class="_intro-title">Hi there</h2>79 <h2 class="_intro-title">Hi there</h2>
80 <p>DevDocs is running inside an Android WebView. Some features may not work properly.80 <p>DevDocs is running inside an Android WebView. Some features may not work properly.
81 <p>If you downloaded an app called DevDocs on the Play Store, please uninstall it — it's made by someone who is using (and profiting from) the name DevDocs without permission.81 <p>If you downloaded an app called DevDocs on the Play Store, please uninstall it — it's made by someone who is using (and profiting from) the name DevDocs without permission.
82 <p>To install DevDocs on your phone, visit <a href="http://devdocs.io" target="_blank">devdocs.io</a> in Chrome and select "Add to home screen" in the menu.82 <p>To install DevDocs on your phone, visit <a href="http://devdocs.io" target="_blank" rel="noopener">devdocs.io</a> in Chrome and select "Add to home screen" in the menu.
83 </div>83 </div>
84"""84"""
assets/javascripts/templates/sidebar_tmpl.coffee+1−1
@@ -60,7 +60,7 @@ templates.sidebarDisabledVersionedDoc = (doc, versions) -> · 59 unmodified lines
60 60
61templates.sidebarPickerNote = """61templates.sidebarPickerNote = """
62 <div class="_list-note">Tip: for faster and better search results, select only the docs you need.</div>62 <div class="_list-note">Tip: for faster and better search results, select only the docs you need.</div>
63 <a href="https://trello.com/b/6BmTulfx/devdocs-documentation" class="_list-link" target="_blank">Vote for new documentation</a>63 <a href="https://trello.com/b/6BmTulfx/devdocs-documentation" class="_list-link" target="_blank" rel="noopener">Vote for new documentation</a>
64 """64 """
65 65
66sidebarFooter = (html) -> """<div class="_sidebar-footer">#{html}</div>"""66sidebarFooter = (html) -> """<div class="_sidebar-footer">#{html}</div>"""