File tree Expand file tree Collapse file tree 3 files changed +1
-51
lines changed Expand file tree Collapse file tree 3 files changed +1
-51
lines changed Original file line number Diff line number Diff line change 33< head >
44 < meta charset ="utf-8 ">
55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6- < title > Gitcasso Markdown Assistant </ title >
6+ < title > Gitcasso</ title >
77</ head >
88< body >
99 < div id ="app ">
10- < div class ="header ">
11- < div class ="logo "> Gitcasso Markdown Assistant</ div >
12- < div class ="subtitle "> Syntax highlighting and autosave for comments on GitHub (and other other markdown-friendly websites).</ div >
13- </ div >
14- < div id ="scan-results ">
15- < p > Loading drafts from local storage...</ p >
16- </ p >
1710 </ div >
1811 < script type ="module " src ="main.ts "> </ script >
1912</ body >
Original file line number Diff line number Diff line change 11import './style.css'
2-
3- document . addEventListener ( 'DOMContentLoaded' , async ( ) => {
4- const statusDiv = document . getElementById ( 'scan-results' ) as HTMLElement
5-
6- try {
7- // get current active tab
8- const tabs = await browser . tabs . query ( { active : true , currentWindow : true } )
9- const tab = tabs [ 0 ]
10-
11- if ( ! tab ?. id ) {
12- statusDiv . textContent = 'Cannot access current tab'
13- return
14- }
15-
16- // send message to content script to get scan results
17- const results = await browser . tabs . sendMessage ( tab . id , {
18- action : 'getScanResults' ,
19- } )
20- if ( results ) {
21- // TODO: statusDiv.textContent = {{show drafts}}
22- }
23- } catch ( error ) {
24- console . error ( 'Popup error:' , error )
25- statusDiv . textContent = 'Unable to load saved drafts.'
26- }
27- } )
Original file line number Diff line number Diff line change 66 line-height : 1.4 ;
77 margin : 0 ;
88}
9-
10- .header {
11- text-align : center;
12- margin-bottom : 15px ;
13- }
14-
15- .logo {
16- font-size : 18px ;
17- font-weight : bold;
18- color : # 0066cc ;
19- margin-bottom : 8px ;
20- }
21-
22- .subtitle {
23- color : # 666 ;
24- font-size : 12px ;
25- }
You can’t perform that action at this time.
0 commit comments