-
-
Notifications
You must be signed in to change notification settings - Fork 895
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates jquery and socket.io inclusions (#988)
- Loading branch information
1 parent
d8a4679
commit 67da0d6
Showing
3 changed files
with
10 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,9 @@ | |
<head> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.3/socket.io.slim.js"></script> | ||
<title>Flask-SocketIO Sessions example</title> | ||
<script src="//code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js" integrity="sha256-yr4fRk/GU1ehYJPAs8P4JlTgu0Hdsp4ZKrx8bDEDC3I=" crossorigin="anonymous"></script> | ||
</head> | ||
<body> | ||
<div class="pure-g"> | ||
|
@@ -105,7 +106,7 @@ <h2>Socket.IO</h2> | |
|
||
$('#connect').click(function() { | ||
if (!socket) { | ||
socket = io.connect(location.href); | ||
socket = io(); | ||
socket.on('refresh-session', function(data) { | ||
$('#socketio-session').text(data['session']); | ||
$('#socketio-user').text(data['user']); | ||
|