File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
- import cookie from 'cookie' ;
1
+ import * as cookie from 'cookie' ;
2
2
3
3
const setCookie = ( cookieName : string , cookieValue : string , expireDays : number ) : void => {
4
4
if ( typeof document === 'undefined' ) {
Original file line number Diff line number Diff line change @@ -520,6 +520,14 @@ class AddSearchClient {
520
520
}
521
521
}
522
522
523
+ setCookie ( cookieName : string , cookieValue : string , expireDays : number ) : void {
524
+ cookie . setCookie ( cookieName , cookieValue , expireDays ) ;
525
+ }
526
+
527
+ getCookie ( cookieName : string ) : string | undefined {
528
+ return cookie . getCookie ( cookieName ) ;
529
+ }
530
+
523
531
searchResultClicked ( documentId : string , position : number ) : void {
524
532
this . sendStatsEvent ( 'click' , this . settings . getSettings ( ) . keyword || '' , {
525
533
documentId,
You can’t perform that action at this time.
0 commit comments