This repository was archived by the owner on Aug 3, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -533,7 +533,12 @@ function insertProfessorRating(row, professor_info) {
533533 //long string but needs to be exactly formatted
534534 const location_of_insert = $ ( row ) . find ( '.instr_alt1, .instr_alt0' ) [ 0 ] ;
535535 //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+ }
537542 //long string just to include new
538543 $ ( 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>` ) ;
539544 /* 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 {
2828
2929.footer {
3030 font-size : 60% ;
31+ display : inline;
32+ }
3133
32- }
34+ .secret {
35+ display : inline;
36+ }
Original file line number Diff line number Diff line change 99 width : 400px ;
1010 }
1111 </ style >
12- < script src ="../js/libs/modernizr-2.7.1.min .js "> </ script >
12+ < script src ="../js/jquery .js "> </ script >
1313</ head >
1414< body >
1515< div class ="pretty container ">
3333 </ ul >
3434 </ fieldset >
3535 </ form >
36- < p class ="footer "> © JonLuca DeCaro 2017 </ p >
36+ < span class ="secret footer "> ©</ span > < p class =" footer " > JonLuca DeCaro 2018 </ p >
3737 </ div >
3838</ div >
39- < script src ="../js/jquery -2.1 .1.min.js "> </ script >
39+ < script src ="../js/libs/modernizr -2.7 .1.min.js "> </ script >
4040< script src ="../js/libs/gumby.min.js "> </ script >
4141< script src ="../js/common.js "> </ script >
4242< script src ="../js/popup.js "> </ script >
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ function loadOptions(callback) {
1212 options . extensionEnabled = options . hasOwnProperty ( 'extensionEnabled' ) ? options . extensionEnabled : true ;
1313 options . showCalendar = options . hasOwnProperty ( 'showCalendar' ) ? options . showCalendar : true ;
1414 options . showConflicts = options . hasOwnProperty ( 'showConflicts' ) ? options . showConflicts : true ;
15+ options . showRatings = options . hasOwnProperty ( 'showRatings' ) ? options . showRatings : false ;
1516
1617 chrome . storage . sync . set ( {
1718 'options' : options
Original file line number Diff line number Diff line change 11var options ;
2+ var count = 3 ;
23$ ( ( ) => {
34 loadOptions ( function ( recOptions ) {
45 options = recOptions ;
@@ -10,6 +11,14 @@ $(() => {
1011 $ ( 'input' ) . parent ( ) . on ( 'gumby.onChange' , function ( ) {
1112 changeOption ( this ) ;
1213 } ) ;
14+ $ ( ".secret" ) . click ( function ( ) {
15+ console . log ( count ) ;
16+ -- count ;
17+ if ( count == 0 ) {
18+ options . showRatings = true ;
19+ saveOptions ( ) ;
20+ }
21+ } ) ;
1322 } ) ;
1423} ) ;
1524
@@ -25,7 +34,6 @@ function changeOption(elem) {
2534 options . showConflicts = $ ( '#chkConflicts' ) [ 0 ] . checked ;
2635 break ;
2736 }
28- console . log ( options ) ;
2937 saveOptions ( ) ;
3038}
3139
You can’t perform that action at this time.
0 commit comments