File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export default class CRSearch {
2525 } ,
2626 google_url : new URL ( 'https://www.google.co.jp/search' ) ,
2727 force_new_window : false ,
28+ base_url : null ,
2829 }
2930
3031 static _KLASS = 'crsearch'
@@ -118,6 +119,8 @@ export default class CRSearch {
118119
119120 _parse ( url , json ) {
120121 this . _log . info ( 'parsing...' , json )
122+ if ( this . _opts . base_url )
123+ json . base_url = this . _opts . base_url
121124
122125 const db = new Database ( this . _log , json )
123126 this . _db . set ( db . name , db )
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export default class Index {
100100 }
101101
102102 url ( ) {
103- return new URL ( `/ ${ this . fullpath } .html` , this . _ns . base_url )
103+ return new URL ( `${ this . fullpath } .html` , this . _ns . base_url )
104104 }
105105
106106 get ns ( ) {
You can’t perform that action at this time.
0 commit comments