-
-
Save rmanalan/142526 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Search Connect and Aria for a single keyword, sites open in separate tabs | |
| CmdUtils.CreateCommand({ | |
| name: "search-oracle", | |
| author: {name: "Jake Kuramoto", | |
| homepage: "http://theappslab.com/"}, | |
| takes: {keyword: noun_arb_text}, | |
| preview: function(pblock, directObject) { | |
| searchText = jQuery.trim(directObject.text); | |
| if(searchText.length < 1) { | |
| pblock.innerHTML = "Searches Connect and Aria for keyword"; | |
| return; | |
| } | |
| var previewTemplate = "Searches for the keyword <b>${query}</b>"; | |
| var previewData = {query: searchText}; | |
| pblock.innerHTML = CmdUtils.renderTemplate(previewTemplate, previewData); | |
| }, | |
| execute: function(directObject) { | |
| var url = "http://connect.oraclecorp.com/search/all?q={QUERY}" | |
| var query = directObject.text; | |
| var urlString = url.replace("{QUERY}", query); | |
| Utils.openUrlInBrowser(urlString); | |
| var url = "http://people.us.oracle.com/pls/oracle/find_person?p_string={QUERY}" | |
| var query = directObject.text; | |
| var urlString1 = url.replace("{QUERY}", query); | |
| Utils.openUrlInBrowser(urlString1); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment