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' ;
22
33const setCookie = ( cookieName : string , cookieValue : string , expireDays : number ) : void => {
44 if ( typeof document === 'undefined' ) {
Original file line number Diff line number Diff line change @@ -520,6 +520,14 @@ class AddSearchClient {
520520 }
521521 }
522522
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+
523531 searchResultClicked ( documentId : string , position : number ) : void {
524532 this . sendStatsEvent ( 'click' , this . settings . getSettings ( ) . keyword || '' , {
525533 documentId,
You can’t perform that action at this time.
0 commit comments