linkedin search command
This commit is contained in:
@@ -19,7 +19,6 @@ const AvailableCommandsIcons = props => {
|
||||
src={'https://image.flaticon.com/icons/png/512/281/281769.png'}
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
{/* Google Calendar */}
|
||||
<Tooltip title="gcal">
|
||||
<img
|
||||
@@ -29,7 +28,6 @@ const AvailableCommandsIcons = props => {
|
||||
}
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
{/* Youtube */}
|
||||
<Tooltip title="utube">
|
||||
<img
|
||||
@@ -39,7 +37,6 @@ const AvailableCommandsIcons = props => {
|
||||
}
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
{/* Google Drive */}
|
||||
<Tooltip title="gdrive">
|
||||
<img
|
||||
@@ -49,7 +46,15 @@ const AvailableCommandsIcons = props => {
|
||||
}
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
{/* LinkedIn */}
|
||||
<Tooltip title="lkin">
|
||||
<img
|
||||
className={styles.icon}
|
||||
src={
|
||||
'https://icon-library.net/images/linkedin-icon-eps/linkedin-icon-eps-29.jpg'
|
||||
}
|
||||
/>
|
||||
</Tooltip>
|
||||
{/* Reddit */}
|
||||
<Tooltip title="red">
|
||||
<img
|
||||
@@ -59,7 +64,6 @@ const AvailableCommandsIcons = props => {
|
||||
}
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
{/* Twitter */}
|
||||
<Tooltip title="twit">
|
||||
<img
|
||||
@@ -70,7 +74,7 @@ const AvailableCommandsIcons = props => {
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
{/* Twitter */}
|
||||
{/* Facebook */}
|
||||
<Tooltip title="fb">
|
||||
<img
|
||||
className={styles.icon}
|
||||
@@ -79,6 +83,7 @@ const AvailableCommandsIcons = props => {
|
||||
}
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
{/* Slack */}
|
||||
{/* <img
|
||||
className={styles.icon}
|
||||
|
||||
@@ -184,6 +184,16 @@ class MainCommand extends Component {
|
||||
newInput = newInput.replace('fb', '');
|
||||
newCommandComplete = true;
|
||||
newCommandInputPlaceholder = 'search for people, groups, etc.';
|
||||
} else if (
|
||||
newInput.includes('lkin') &&
|
||||
newCommandIcon == envVars.DEFAULT_LOGO
|
||||
) {
|
||||
newCommand = 'lkin';
|
||||
newCommandIcon =
|
||||
'https://icon-library.net/images/linkedin-icon-eps/linkedin-icon-eps-29.jpg';
|
||||
newInput = newInput.replace('lkin', '');
|
||||
newCommandComplete = true;
|
||||
newCommandInputPlaceholder = 'search for people, jobs, etc.';
|
||||
} // this one must be last, as its the default google search
|
||||
else if (newCommand == 'google') {
|
||||
newCommand = 'google';
|
||||
@@ -253,10 +263,8 @@ class MainCommand extends Component {
|
||||
window.location = 'https://www.google.com/search?q=' + commandInput;
|
||||
}
|
||||
} else if (this.state.command == 'utube') {
|
||||
window.open(
|
||||
'https://www.youtube.com/results?search_query=' + commandInput,
|
||||
'_blank'
|
||||
);
|
||||
window.location =
|
||||
'https://www.youtube.com/results?search_query=' + commandInput;
|
||||
} else if (this.state.command == 'reddit') {
|
||||
window.location = 'https://www.reddit.com/r/' + commandInput;
|
||||
} else if (this.state.command == 'twitter') {
|
||||
@@ -266,6 +274,12 @@ class MainCommand extends Component {
|
||||
var fbUrl =
|
||||
'https://www.facebook.com/search/top/?q=' + transformedSearchQuery;
|
||||
window.location = fbUrl;
|
||||
} else if (this.state.command == 'lkin') {
|
||||
var transformedSearchQuery = commandInput.replace(' ', '%20');
|
||||
var lkinUrl =
|
||||
'https://www.linkedin.com/search/results/all/?keywords=' +
|
||||
transformedSearchQuery;
|
||||
window.location = lkinUrl;
|
||||
}
|
||||
|
||||
this.setState(INITIAL_COMMAND_STATE, () => {
|
||||
|
||||
Reference in New Issue
Block a user