File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,8 +204,8 @@ const ScriptMenuList: React.FC<{
204204 } ) ;
205205 } }
206206 >
207- { isExclude ( item , url . host ) ? "恢复 " : "排除 " }
208- { ` ${ url . host } 在上执行 ` }
207+ { isExclude ( item , url . host ) ? "恢复在 " : "排除在 " }
208+ { ` ${ url . host } 上执行 ` }
209209 </ Button >
210210 ) }
211211 < Popconfirm
Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ function App() {
4545 const [ version , setVersion ] = useState ( ExtVersion ) ;
4646 const [ currentUrl , setCurrentUrl ] = useState ( "" ) ;
4747
48+ let url : URL | undefined ;
49+ try {
50+ url = new URL ( currentUrl ) ;
51+ } catch ( e ) {
52+ // ignore error
53+ }
54+
4855 const message = IoC . instance ( MessageInternal ) as MessageInternal ;
4956 useEffect ( ( ) => {
5057 systemManage . getNotice ( ) . then ( ( res ) => {
@@ -142,7 +149,11 @@ function App() {
142149 < IconPlus style = { iconStyle } />
143150 新建脚本
144151 </ Menu . Item >
145- < Menu . Item key = "https://scriptcat.org/" >
152+ < Menu . Item
153+ key = { `https://scriptcat.org/search?domain=${
154+ url && url . host
155+ } `}
156+ >
146157 < IconSearch style = { iconStyle } />
147158 获取脚本
148159 </ Menu . Item >
You can’t perform that action at this time.
0 commit comments