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