File tree Expand file tree Collapse file tree 9 files changed +3173
-2665
lines changed
Expand file tree Collapse file tree 9 files changed +3173
-2665
lines changed Original file line number Diff line number Diff line change 3232 run : npm install --global web-ext && web-ext build --no-config-discovery
3333
3434 - name : Validate Web Extension (Firefox)
35- run : web-ext lint --no-config-discovery
35+ run : web-ext lint --self-hosted -- no-config-discovery
Original file line number Diff line number Diff line change 4242 background-color : # 111 ;
4343}
4444
45+ .SidebarItemActive {
46+ background : # 49bfaa ;
47+ }
48+
49+ .SidebarItemActive : hover {
50+ background : rgb (58 , 184 , 161 );
51+ }
52+
4553.Sidebar h2 ,
4654.SidebarMessage {
4755 padding : 0 15px ;
Original file line number Diff line number Diff line change 88 },
99 {
1010 "version" : " 0.2" ,
11- "update_link" : " https://github.com/mjakeman/easel/releases/download/v0.2/easel-firefox.xpi" ,
11+ "update_link" : " https://github.com/mjakeman/easel/releases/download/v0.2/easel-firefox.xpi"
1212 },
1313 {
1414 "version" : " 0.2.1" ,
15- "update_link" : " https://github.com/mjakeman/easel/releases/download/v0.2.1/easel-firefox.xpi" ,
15+ "update_link" : " https://github.com/mjakeman/easel/releases/download/v0.2.1/easel-firefox.xpi"
1616 }
1717 ]
1818 }
1919 }
20- }
20+ }
Original file line number Diff line number Diff line change 11{
22 "manifest_version" : 2 ,
33 "name" : " Easel - Lecture Recordings (UoA)" ,
4- "version" : " 0.2.1 " ,
4+ "version" : " 0.3 " ,
55 "author" : " Matt Jakeman" ,
66 "description" : " An unofficial enhancement suite for watching Lecture Recordings at the University of Auckland." ,
77
88 "browser_specific_settings" : {
99 "gecko" : {
10- "id" : " easel@mattjakeman.com"
10+ "id" : " easel@mattjakeman.com" ,
11+ "update_url" : " https://raw.githubusercontent.com/mjakeman/easel/master/fx-updates.json"
1112 }
1213 },
1314
Original file line number Diff line number Diff line change 2424 "webpack-dev-server" : " ^3.11.2"
2525 },
2626 "dependencies" : {
27- "typescript-plugin-css-modules" : " ^3.4.0" ,
28- "@types/arrive" : " ^2.4.0" ,
29- "@types/jest" : " ^26.0.23" ,
30- "@types/node" : " ^12.20.15" ,
31- "@types/react" : " ^17.0.11" ,
32- "@types/react-dom" : " ^17.0.7" ,
27+ "@types/arrive" : " ^2.4.1" ,
28+ "@types/jest" : " ^26.0.24" ,
29+ "@types/node" : " ^12.20.17" ,
30+ "@types/react" : " ^17.0.15" ,
31+ "@types/react-dom" : " ^17.0.9" ,
3332 "arrive" : " ^2.4.1" ,
3433 "react" : " ^17.0.2" ,
3534 "react-dom" : " ^17.0.2" ,
3635 "react-scripts" : " 4.0.3" ,
37- "ts-loader" : " ^9.2.3" ,
38- "typescript" : " ^4.3.2" ,
36+ "ts-loader" : " ^9.2.4" ,
37+ "typescript" : " ^4.3.5" ,
38+ "typescript-plugin-css-modules" : " ^3.4.0" ,
39+ "web-ext" : " ^6.2.0" ,
3940 "web-vitals" : " ^1.1.2" ,
4041 "webextension-polyfill-ts" : " ^0.25.0" ,
41- "webpack" : " ^5.38.1 "
42+ "webpack" : " ^5.46.0 "
4243 }
4344}
Original file line number Diff line number Diff line change @@ -10,6 +10,14 @@ export interface SidebarItemProps {
1010export class SidebarItem extends React . Component < SidebarItemProps , { } > {
1111 render ( ) {
1212 let recording = this . props . recording ;
13- return < a className = { Style . SidebarItem } href = { recording . url } > { recording . title } </ a >
13+
14+ // Check if the target URL matches our current URL
15+ let isActive = ( recording . url === window . location . href ) ;
16+
17+ var activeClass = isActive
18+ ? Style . SidebarItemActive
19+ : "" ;
20+
21+ return < a className = { `${ Style . SidebarItem } ${ activeClass } ` } href = { recording . url } > { recording . title } </ a >
1422 }
1523}
Original file line number Diff line number Diff line change @@ -38,6 +38,11 @@ btn.onclick = function() {
3838 let title = titleAnchor . innerText ;
3939 let url = titleAnchor . href ;
4040
41+ // Replace mediastore URLs with mediaplayer
42+ if ( url . includes ( "mediastore" ) ) {
43+ url = url . replace ( "mediastore" , "mediaplayer" ) ;
44+ }
45+
4146 let lectureInfo = lecture . querySelectorAll ( "td" ) ;
4247 if ( lectureInfo === null )
4348 continue ;
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ function load() {
1717}
1818
1919// Redirect to mediaplayer
20- let url = window . location . href ;
20+ // let url = window.location.href;
2121
22- if ( url . includes ( "mediastore" ) ) {
23- var newUrl = window . location . href . replace ( "mediastore" , "mediaplayer" ) ;
24- window . location . replace ( newUrl ) ;
25- }
22+ // if (url.includes("mediastore")) {
23+ // var newUrl = window.location.href.replace("mediastore", "mediaplayer");
24+ // window.location.replace(newUrl);
25+ // }
2626
2727document . arrive ( "video" , load ) ;
You can’t perform that action at this time.
0 commit comments