File tree Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Expand file tree Collapse file tree 4 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ function detectLocation(): StrippedLocation {
1515 const result = {
1616 host : window . location . host ,
1717 pathname : window . location . pathname ,
18+ search : window . location . search ,
1819 }
1920 logger . debug ( "[gitcasso] detectLocation called, returning:" , result )
2021 return result
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export interface CommentEvent {
2626export interface StrippedLocation {
2727 host : string
2828 pathname : string
29+ search : string
2930}
3031
3132/** Wraps the textareas of a given platform with Gitcasso's enhancements. */
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ export function detectedSpots() {
6666 const location : StrippedLocation = {
6767 host : window . location . host ,
6868 pathname : window . location . pathname ,
69+ search : window . location . search ,
6970 }
7071 const detectionResults = [ ]
7172 for ( const textarea of textareas ) {
@@ -86,6 +87,7 @@ export function tableUI() {
8687 const location : StrippedLocation = {
8788 host : window . location . host ,
8889 pathname : window . location . pathname ,
90+ search : window . location . search ,
8991 }
9092 const uiResults = [ ]
9193 for ( const textarea of textareas ) {
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ function getUrlParts(key: string) {
9797 hostname : url . hostname ,
9898 href : originalUrl ,
9999 pathname : url . pathname ,
100+ search : url . search ,
100101 }
101102}
102103
@@ -566,7 +567,8 @@ function createGitcassoScript(
566567 // Set up mocked location
567568 window.gitcassoMockLocation = {
568569 host: '${ urlParts . host } ',
569- pathname: '${ urlParts . pathname } '
570+ pathname: '${ urlParts . pathname } ',
571+ search: '${ urlParts . search } '
570572 };
571573
572574 // Set up browser API mocks
@@ -603,7 +605,8 @@ function createGitcassoScript(
603605 );
604606 window.gitcassoMockLocation = {
605607 host: '${ urlParts . host } ',
606- pathname: '${ urlParts . pathname } '
608+ pathname: '${ urlParts . pathname } ',
609+ search: '${ urlParts . search } '
607610 };
608611
609612 // Execute the patched script with browser API mocks prepended
You can’t perform that action at this time.
0 commit comments