Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade jquery from 1.4.2 (circa 2010) to 3.7.1 #759

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
static/straw/compact.js
static/js/jquery-min-1.4.2.js
static/js/jquery-3.7.1.min.js
2 changes: 2 additions & 0 deletions static/js/jquery-3.7.1.min.js

Large diffs are not rendered by default.

154 changes: 0 additions & 154 deletions static/js/jquery-min-1.4.2.js

This file was deleted.

14 changes: 7 additions & 7 deletions static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1190,12 +1190,12 @@ $(document).ready(function () {
apply_hover_for_video($(".image-content video.autoplay"));

/* Open / close notification boxes */
$(".notification-block-hd").live("click", function () {
$(".notification-block-hd").on("click", function () {
$(this).next().toggle();
});

/* User follow module */
$(".user-follow .submit-form").live("click", function () {
$(".user-follow .submit-form").on("click", function () {
var $container = $(this).parents(".user-follow");
var $form = $container.find("form");
var url = $form.attr("action");
Expand Down Expand Up @@ -1234,7 +1234,7 @@ $(document).ready(function () {
return false;
});

$(".notification-close").live("click", function () {
$(".notification-close").on("click", function () {
$notification = $(this).parent(".notification");
var $notification_block = $(this).parents(".notification-block");
var $notification_block_hd = $notification_block.find(
Expand Down Expand Up @@ -1265,7 +1265,7 @@ $(document).ready(function () {
return false;
});

$(".notification-block .clear-all a").live("click", function () {
$(".notification-block .clear-all a").on("click", function () {
var url = $(this).attr("href");
var $notification_block = $(this).parents(".notification-block");
$.post(
Expand All @@ -1291,7 +1291,7 @@ $(document).ready(function () {
});

/* Notification block: invitations: */
$("#notifcation-block-invitations form").live("submit", function () {
$("#notifcation-block-invitations form").on("submit", function () {
var data = $(this).serialize();
var url = $(this).attr("action");

Expand Down Expand Up @@ -1331,7 +1331,7 @@ $(document).ready(function () {
});

/* Notification block: shake invitations: */
$("#notifcation-block-shakeinvitation form").live("submit", function () {
$("#notifcation-block-shakeinvitation form").on("submit", function () {
var data = $(this).serialize();
var url = $(this).attr("action");
var $block = $(this).parents(".notification");
Expand Down Expand Up @@ -1637,7 +1637,7 @@ $(document).ready(function () {
$("#content-find-people-body").load(
"/tools/find-shakes/quick-fetch-twitter",
);
$("#refresh-friends a").live("click", function () {
$("#refresh-friends a").on("click", function () {
$("#content-find-people-body").load(
"/tools/find-shakes/quick-fetch-twitter?refresh=1",
);
Expand Down
2 changes: 1 addition & 1 deletion static/js/paging_keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ var pagingKeys = (function () {
}

function init() {
$(window).load(setupPagingKeys);
$(window).on("load", setupPagingKeys);
windowScrollInit();
}

Expand Down
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
</div>
</div>
<div id="new-post-panel" class="new-post-panel"><div class="new-post-panel--inner"></div></div>
<script type="text/javascript" charset="utf-8" src="{{ static_url("js/jquery-min-1.4.2.js") }}"></script>
<script type="text/javascript" charset="utf-8" src="{{ static_url("js/jquery-3.7.1.min.js") }}" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="></script>
<script type="text/javascript" charset="utf-8" src="{{ static_url("js/main.js") }}"></script>
<script type="text/javascript" charset="utf-8" src="{{ static_url("js/paging_keys.js") }}"></script>
{% block included_scripts %}
Expand Down
2 changes: 1 addition & 1 deletion templates/tools/base-sign-in.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{% end %}
</div>

<script type="text/javascript" charset="utf-8" src="{{ static_url("js/jquery-min-1.4.2.js") }}"></script>
<script type="text/javascript" charset="utf-8" src="{{ static_url("js/jquery-3.7.1.min.js") }}" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="></script>
{% block included_scripts %}{% end %}
</body>
</html>
2 changes: 1 addition & 1 deletion templates/tools/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</div>
</div>

<script type="text/javascript" charset="utf-8" src="{{ static_url("js/jquery-min-1.4.2.js") }}"></script>
<script type="text/javascript" charset="utf-8" src="{{ static_url("js/jquery-3.7.1.min.js") }}" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo="></script>
<script type="text/javascript" src="{{ static_url("js/tools.js")}}" charset="utf-8"></script>
{% block included_scripts %}{% end %}
</body>
Expand Down