This repository was archived by the owner on Nov 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +24
-6
lines changed Expand file tree Collapse file tree 5 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -533,7 +533,12 @@ function insertProfessorRating(row, professor_info) {
533
533
//long string but needs to be exactly formatted
534
534
const location_of_insert = $ ( row ) . find ( '.instr_alt1, .instr_alt0' ) [ 0 ] ;
535
535
//actual contents of rating
536
- const rating_anchor = `<a class="rating" href=${ url } target="_blank">Link</a>` ;
536
+ let rating_anchor = `<a class="rating" href=${ url } target="_blank">Link</a>` ;
537
+ // If you want the rating on the page, just delete the string above and rename the one below this comment to rating_anchor
538
+ const rating_anchor_with_score = `<a class="rating" href=${ url } target="_blank">${ professor_info . rating } </a>` ;
539
+ if ( options . showRatings ) {
540
+ rating_anchor = rating_anchor_with_score ;
541
+ }
537
542
//long string just to include new
538
543
$ ( location_of_insert ) . after ( `<span class="hours_alt1 text-center col-xs-12 col-sm-12 col-md-1 col-lg-1"><span class="hidden-lg hidden-visible-xs-* visible-sm-* table-headers-xsmall">Prof. Rating: </span>${ rating_anchor } </span>` ) ;
539
544
/* Very specific edge case - if you have two professors and you could not find the first, it'll insert an empty cell. However, if you can
Original file line number Diff line number Diff line change @@ -28,5 +28,9 @@ input[type=range]::-webkit-slider-runnable-track {
28
28
29
29
.footer {
30
30
font-size : 60% ;
31
+ display : inline;
32
+ }
31
33
32
- }
34
+ .secret {
35
+ display : inline;
36
+ }
Original file line number Diff line number Diff line change 9
9
width : 400px ;
10
10
}
11
11
</ style >
12
- < script src ="../js/libs/modernizr-2.7.1.min .js "> </ script >
12
+ < script src ="../js/jquery .js "> </ script >
13
13
</ head >
14
14
< body >
15
15
< div class ="pretty container ">
33
33
</ ul >
34
34
</ fieldset >
35
35
</ form >
36
- < p class ="footer "> © JonLuca DeCaro 2017 </ p >
36
+ < span class ="secret footer "> ©</ span > < p class =" footer " > JonLuca DeCaro 2018 </ p >
37
37
</ div >
38
38
</ div >
39
- < script src ="../js/jquery -2.1 .1.min.js "> </ script >
39
+ < script src ="../js/libs/modernizr -2.7 .1.min.js "> </ script >
40
40
< script src ="../js/libs/gumby.min.js "> </ script >
41
41
< script src ="../js/common.js "> </ script >
42
42
< script src ="../js/popup.js "> </ script >
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ function loadOptions(callback) {
12
12
options . extensionEnabled = options . hasOwnProperty ( 'extensionEnabled' ) ? options . extensionEnabled : true ;
13
13
options . showCalendar = options . hasOwnProperty ( 'showCalendar' ) ? options . showCalendar : true ;
14
14
options . showConflicts = options . hasOwnProperty ( 'showConflicts' ) ? options . showConflicts : true ;
15
+ options . showRatings = options . hasOwnProperty ( 'showRatings' ) ? options . showRatings : false ;
15
16
16
17
chrome . storage . sync . set ( {
17
18
'options' : options
Original file line number Diff line number Diff line change 1
1
var options ;
2
+ var count = 3 ;
2
3
$ ( ( ) => {
3
4
loadOptions ( function ( recOptions ) {
4
5
options = recOptions ;
@@ -10,6 +11,14 @@ $(() => {
10
11
$ ( 'input' ) . parent ( ) . on ( 'gumby.onChange' , function ( ) {
11
12
changeOption ( this ) ;
12
13
} ) ;
14
+ $ ( ".secret" ) . click ( function ( ) {
15
+ console . log ( count ) ;
16
+ -- count ;
17
+ if ( count == 0 ) {
18
+ options . showRatings = true ;
19
+ saveOptions ( ) ;
20
+ }
21
+ } ) ;
13
22
} ) ;
14
23
} ) ;
15
24
@@ -25,7 +34,6 @@ function changeOption(elem) {
25
34
options . showConflicts = $ ( '#chkConflicts' ) [ 0 ] . checked ;
26
35
break ;
27
36
}
28
- console . log ( options ) ;
29
37
saveOptions ( ) ;
30
38
}
31
39
You can’t perform that action at this time.
0 commit comments