Skip to content

Commit de97ece

Browse files
authored
RmJQuery: eliminate .ready() references (#1449)
1 parent 988ed3c commit de97ece

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

app/javascript/application.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ var AppView = Backbone.NativeView.extend({
323323
}
324324
});
325325

326-
$(document).ready(function() {
326+
document.addEventListener("DOMContentLoaded", function() {
327327
Mousetrap.bind("?", function() {
328328
bootstrap.Modal.getOrCreateInstance(document.getElementById('shortcuts')).toggle();
329329
});

app/views/feeds/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<% end %>
1818

1919
<script type="text/javascript">
20-
$(document).ready(function () {
20+
document.addEventListener("DOMContentLoaded", function () {
2121
document.querySelectorAll(".status").forEach(function(el) {
2222
new bootstrap.Tooltip(el);
2323
});

app/views/imports/new.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</div>
2222

2323
<script type="text/javascript">
24-
$(document).ready(function() {
24+
document.addEventListener("DOMContentLoaded", function() {
2525
$('#opml_file').on("change", function(e) {
2626
$('form#import').submit();
2727
});

app/views/layouts/_flash.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</div>
2222

2323
<script type="text/javascript">
24-
$(document).ready(function() {
24+
document.addEventListener("DOMContentLoaded", function() {
2525
if (!navigator.cookieEnabled) {
2626
$("#cookies-required").show();
2727
}

app/views/stories/_js.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<%= render 'stories/templates' %>
22

33
<script type="text/javascript">
4-
$(document).ready(function() {
4+
document.addEventListener("DOMContentLoaded", function() {
55
var Stories = new StoryList;
66
var StoryApp = new AppView(Stories);
77
StoryApp.loadData(<%= sanitize(stories.to_json) %>);

0 commit comments

Comments
 (0)