Skip to content

Commit

Permalink
Remove obsolete google js api loading mechanism
Browse files Browse the repository at this point in the history
  • Loading branch information
egaga committed Aug 16, 2024
1 parent 005129f commit 1abe7a7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 32 deletions.
7 changes: 3 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@

<script type="text/Javascript" src="js/tutorial/init_tutorial.js?version={VERSION}"></script>

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.6.4");
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>

<script type="text/javascript">
const urlParams = new URLSearchParams(window.location.search);

google.setOnLoadCallback(function () {
$(document).ready(function () {
if (urlParams.has('layout')) {
init_tutorial(urlParams.get('layout'));
} else {
Expand Down
10 changes: 5 additions & 5 deletions problems.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
<script type="text/Javascript" src="js/view/event.js?version={VERSION}"></script>
<script type="text/Javascript" src="js/problems/init_problems.js?version={VERSION}"></script>

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript">
google.load("jquery", "1.6.4");

google.setOnLoadCallback(init_problems);
</script>
$(document).ready(function () {
init_problems();
});
</script>

</head>

Expand Down
6 changes: 2 additions & 4 deletions sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@
<script type="text/Javascript" src="js/view/event.js?version={VERSION}"></script>
<script type="text/Javascript" src="js/init.js?version={VERSION}"></script>

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript">
google.load("jquery", "1.6.4");

google.setOnLoadCallback(function() {
$(document).ready(function () {
init_vim();
});
</script>
Expand Down
9 changes: 2 additions & 7 deletions tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,9 @@
<script type="text/Javascript" src="js/testing/testview.js?version={VERSION}"></script>
<script type="text/Javascript" src="js/testing/init_testing.js?version={VERSION}"></script>

<!--
<script type="text/Javascript" src="js/jquery.js"></script>
-->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript">
google.load("jquery", "1.6.4");

google.setOnLoadCallback(function() {
$(document).ready(function () {
init_testing();

$('.test_description').live('click', function() {
Expand Down
19 changes: 7 additions & 12 deletions twosandboxes.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,16 @@
<script type="text/Javascript" src="js/view/event.js?version={VERSION}"></script>
<script type="text/Javascript" src="js/init.js?version={VERSION}"></script>

<!--
<script type="text/Javascript" src="js/jquery.js"></script>
-->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript">
google.load("jquery", "1.6.4");
$(document).ready(function () {
init_vim();

google.setOnLoadCallback(function() {
init_vim();

$('.screen_view').click(function() {
$('.active_context').removeClass('active_context');
$(this).addClass('active_context');
$('.screen_view').click(function() {
$('.active_context').removeClass('active_context');
$(this).addClass('active_context');
});
});
});
</script>
</head>

Expand Down

0 comments on commit 1abe7a7

Please sign in to comment.