File tree Expand file tree Collapse file tree 4 files changed +9
-21
lines changed Expand file tree Collapse file tree 4 files changed +9
-21
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ All notable changes to this project will be documented in this file.
12
12
13
13
# v1.x (official releases)
14
14
15
+ ### [ 1.5.1] ( https://github.com/lxieyang/vertical-tabs-chrome-extension/releases/tag/v1.5.1 ) (2019-12-29)
16
+
17
+ - Fixed a bug where the ` new URL() ` API returns invalid.
18
+ - Removed redundant code on search bar auto focus.
19
+
15
20
### [ 1.5.0] ( https://github.com/lxieyang/vertical-tabs-chrome-extension/releases/tag/v1.5.0 ) (2019-12-26)
16
21
17
22
- Dark theme support! 🕶️🕶️🕶️
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vertical-tabs-chrome-extension" ,
3
- "version" : " 1.5.0 " ,
3
+ "version" : " 1.5.1 " ,
4
4
"description" : " A chrome extension that presents your tabs vertically." ,
5
5
"license" : " MIT" ,
6
6
"repository" : {
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ class Sidebar extends Component {
102
102
status : 'complete' ,
103
103
combinedText : [
104
104
tab . title , // title
105
- new URL ( tab . url ) . hostname . replace ( 'www.' , '' ) , // hostname
105
+ tab . url !== '' ? new URL ( tab . url ) . hostname . replace ( 'www.' , '' ) : '' , // hostname
106
106
]
107
107
. join ( ' ' )
108
108
. toLowerCase ( ) ,
@@ -156,7 +156,7 @@ class Sidebar extends Component {
156
156
status : tab . status ,
157
157
combinedText : [
158
158
tab . title , // title
159
- new URL ( tab . url ) . hostname . replace ( 'www.' , '' ) , // hostname
159
+ tab . url !== '' ? new URL ( tab . url ) . hostname . replace ( 'www.' , '' ) : '' , // hostname
160
160
]
161
161
. join ( ' ' )
162
162
. toLowerCase ( ) ,
Original file line number Diff line number Diff line change 1
- import React , { useEffect , useRef , useContext } from 'react' ;
1
+ import React , { useContext } from 'react' ;
2
2
import DarkModeContext from '../../../context/dark-mode-context' ;
3
3
import './SearchBar.css' ;
4
4
@@ -10,27 +10,10 @@ const SearchBar = ({
10
10
const darkModeContext = useContext ( DarkModeContext ) ;
11
11
const { isDark } = darkModeContext ;
12
12
13
- useEffect ( ( ) => {
14
- chrome . runtime . onMessage . addListener ( ( request , sender , sendResponse ) => {
15
- if ( request . from === 'background' && request . msg === 'TOGGLE_SIDEBAR' ) {
16
- if ( request . toStatus ) {
17
- this . searchInput . focus ( ) ;
18
- } else {
19
- this . searchInput . blur ( ) ;
20
- }
21
- }
22
- } ) ;
23
- } , [ ] ) ;
24
-
25
- let inputRef = useRef ( null ) ;
26
-
27
13
return (
28
14
< div className = "SearchBarContainer" >
29
15
< input
30
16
// autoFocus
31
- ref = { ( input ) => {
32
- inputRef = input ;
33
- } }
34
17
type = "search"
35
18
className = { [ 'SearchBarInput' , isDark ? 'Dark' : null ] . join ( ' ' ) }
36
19
placeholder = { '🔍 search tabs here' }
You can’t perform that action at this time.
0 commit comments