File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ $ ( document ) . ready ( function ( ) {
2
+ let photos = Array . from ( document . querySelectorAll ( '.eval-user-img' ) )
3
+
4
+ top . onclick = function ( e ) {
5
+ let tsib = e . target . previousElementSibling
6
+ if ( tsib != null ) {
7
+ if ( tsib . classList . contains ( 'eval-user-img' ) ) {
8
+ return ;
9
+ }
10
+ }
11
+ if ( e . target . classList . contains ( 'eval-user-img' ) ) {
12
+ return ;
13
+ }
14
+ document . querySelector ( '#zoom-photo' ) . remove ( )
15
+ }
16
+
17
+ photos . forEach ( ( photo ) => {
18
+ photo . addEventListener ( 'click' , ( e ) => {
19
+ let other = document . querySelector ( '#zoom-photo' )
20
+ if ( other != null ) {
21
+ other . remove ( )
22
+ }
23
+ photo . insertAdjacentHTML ( 'afterend' , `
24
+ <div id="zoom-photo" style="position: fixed; z-index: 1050; display: block">
25
+ <img class="eval-user-img"
26
+ alt=${ photo . alt }
27
+ src=${ photo . src }
28
+ style="max-width: 200px; max-height: 200px; border: 1px solid #666"
29
+ >
30
+ </div>
31
+ ` )
32
+ e . preventDefault ( ) ;
33
+ } )
34
+ } )
35
+
36
+ } )
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ <h4 class="page-title">Active Packets</h4>
111
111
112
112
{% block scripts %}
113
113
{{ super() }}
114
+ < script src ="{{ url_for('static', filename='js/pfp-zoom.min.js') }} "> </ script >
114
115
{% if info.realm == "csh" %}
115
116
< script src ="{{ url_for('static', filename='js/tables.min.js') }} "> </ script >
116
117
{% endif %}
Original file line number Diff line number Diff line change @@ -192,3 +192,7 @@ <h5>Upperclassmen Score - {{ '%0.2f' % upper_score }}%</h5>
192
192
</ div >
193
193
</ div >
194
194
{% endblock %}
195
+ {% block scripts %}
196
+ {{ super() }}
197
+ < script src ="{{ url_for('static', filename='js/pfp-zoom.min.js') }} "> </ script >
198
+ {% endblock %}
You can’t perform that action at this time.
0 commit comments