Skip to content

Commit 43b0624

Browse files
committed
js: Update jQuery to 2.2.4 and add jQuery Migrate plugin
Versions 1.x and 2.x no longer receive any patches, and there are likely some uses of deprecated 1.x features in the dlang.org site. Bump it to the most up-to-date version that the migration plugin will allow us to in order to flag problems. Afterwards, it should be possible to jump to the latest 3.x version.
1 parent 2ed31bf commit 43b0624

File tree

7 files changed

+769
-12
lines changed

7 files changed

+769
-12
lines changed

book/dlang.org.ddoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ COMMON_HEADERS_DLANG=
3030
<link rel="stylesheet" href="$(STATIC css/codemirror.css)">
3131
_=
3232
COMMON_SCRIPTS =
33-
$(SCRIPTLOAD https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js)
34-
$(SCRIPT window.jQuery || document.write('\x3Cscript src="$(STATIC js/jquery-1.7.2.min.js)">\x3C/script>');$(EXTRA_JS))
33+
$(SCRIPTLOAD https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js)
34+
$(SCRIPT window.jQuery || document.write('\x3Cscript src="$(STATIC js/jquery-2.2.4.min.js)">\x3C/script>');$(EXTRA_JS))
35+
$(SCRIPTLOAD $(STATIC js/jquery-migrate-1.4.1.js))
3536
$(SCRIPTLOAD $(STATIC js/dlang.js))
3637
$(COMMON_SCRIPTS_DLANG)
3738
_=

dlang.org.ddoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ COMMON_HEADERS_DLANG=
3131
<link rel="stylesheet" href="$(STATIC css/codemirror.css)">
3232
_=
3333
COMMON_SCRIPTS =
34-
$(SCRIPTLOAD https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js)
35-
$(SCRIPT window.jQuery || document.write('\x3Cscript src="$(STATIC js/jquery-1.7.2.min.js)">\x3C/script>');$(EXTRA_JS))
34+
$(SCRIPTLOAD https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js)
35+
$(SCRIPT window.jQuery || document.write('\x3Cscript src="$(STATIC js/jquery-2.2.4.min.js)">\x3C/script>');$(EXTRA_JS))
36+
$(SCRIPTLOAD $(STATIC js/jquery-migrate-1.4.1.js))
3637
$(SCRIPTLOAD $(STATIC js/dlang.js))
3738
$(COMMON_SCRIPTS_DLANG)
3839
_=

dpl-docs/views/layout.dt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ html(lang='en-US')
3030
link(rel='stylesheet', href='#{root_dir}css/ddox.css')
3131
link(rel='stylesheet', href='https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css')
3232
link(rel='shortcut icon', href='#{root_dir}favicon.ico')
33-
script(src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', type='text/javascript')
33+
script(src='https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js', type='text/javascript')
34+
script(type='text/javascript', src='#{root_dir}js/jquery-migrate-1.4.1.js')
3435
meta(name='viewport', content='width=device-width, initial-scale=1.0, minimum-scale=0.1, maximum-scale=10.0')
3536

3637
body.std(id='#{info.node.moduleName}')
@@ -228,10 +229,12 @@ html(lang='en-US')
228229
#copyright.smallprint
229230
| Copyright &copy; 1999-#{year} by the <a href="#{root_dir}foundation_overview.html">D Language Foundation</a> | Page generated by <a href="https://github.com/rejectedsoftware/ddox">ddox</a>.
230231

231-
script(type='text/javascript', src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js')
232+
script(type='text/javascript', src='https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js')
232233
|
233234
script(type='text/javascript').
234-
window.jQuery || document.write('\x3Cscript src="#{root_dir}js/jquery-1.7.2.min.js">\x3C/script>')
235+
window.jQuery || document.write('\x3Cscript src="#{root_dir}js/jquery-2.2.4.min.js">\x3C/script>')
236+
|
237+
script(type='text/javascript', src='#{root_dir}js/jquery-migrate-1.4.1.js')
235238
|
236239
script(type='text/javascript', src='#{root_dir}js/codemirror-compressed.js')
237240
|

js/jquery-1.7.2.min.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

js/jquery-2.2.4.min.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)