Author Topic: Anyone know Javascript - Building a Chrome browser extension  (Read 1298 times)

0 Members and 1 Guest are viewing this topic.

Offline dimamantra

  • Thread Starter
  • Posts: 137
  • | (• ◡•)| (❍ᴥ❍ʋ)
Anyone know Javascript - Building a Chrome browser extension
« on: Fri, 08 March 2013, 22:23:15 »
So this is more of an inquiry to the community before I go into detail about what I am trying to do. I know this is a mainly keyboard focused community but there has to be someone here that knows JS.

Overall I am building a Chrome browser extension and need a set of experienced JS eyes to look over my code and figure out what I am doing wrong.

I know HTML and CSS but my JS skills are very weak.

If anyone is familiar with writing Chrome extensions and thinks they can handle a very simple project let me know. I can use all the advice I can get on this.

Thanks  :)


http://pastebin.com/BMpF5yGL

^ Links to the code
« Last Edit: Sat, 09 March 2013, 00:02:19 by dimamantra »

Offline agodinhost

  • Posts: 767
  • Location: Brazil, RJ
  • Soylent green is people ...
    • Dr Ian O Xaman
Re: Anyone know Javascript - Building a Chrome browser extension
« Reply #1 on: Wed, 13 March 2013, 14:38:44 »
I do code for living man.

What do you wanna do?
Building one square I2C keyboard with those 1200 switches (thanks JDCarpe)
GH60 |GH60-Alps |GH60-BT |GHPad/GHPad Alps |GH60-Case |Alps TKL |EL Wire |OS Controller, Round 2 |My Custom Keyboard |WTT/WTB

Offline dimamantra

  • Thread Starter
  • Posts: 137
  • | (• ◡•)| (❍ᴥ❍ʋ)
Re: Anyone know Javascript - Building a Chrome browser extension
« Reply #2 on: Wed, 13 March 2013, 22:40:23 »
I do code for living man.

What do you wanna do?

I am creating a browser plug-in that will essential take the inputted text and place it at the end of a search URL, thus opening the correct page to display the results. (this is a tool I am making for work. Not that I am being paid to make the tool, I am making the tool for personal use to increase my productivity.)

At this point in time I don't think I am linking the popup.js file to the popup.html properly as nothing takes place when I type and hit the enter key. I have a browser action running with a pop up box, input field, and selector but the JS doesn't seem to be "linked" to the .html doc.

Here is a link to the source code.
* exFills.zip (2.18 kB - downloaded 78 times.)

I have X-ed out the query URLs for security reasons. Any help would be awesome.
Please let me know if you have questions or if something is not clear.

Thank you for replying to my thread :)



Offline agodinhost

  • Posts: 767
  • Location: Brazil, RJ
  • Soylent green is people ...
    • Dr Ian O Xaman
Re: Anyone know Javascript - Building a Chrome browser extension
« Reply #3 on: Thu, 14 March 2013, 08:46:07 »
To be sure that your code executed just add one alert, something like:


function dosearch() {
alert("test, I passed on dosearch");
var sf=document.searchform;
var submitto = sf.sengines.options[sf.sengines.selectedIndex].value + escape(sf.searchterms.value);
window.open(submitto);
return false;
}

I did not understood what is your problem ...
Building one square I2C keyboard with those 1200 switches (thanks JDCarpe)
GH60 |GH60-Alps |GH60-BT |GHPad/GHPad Alps |GH60-Case |Alps TKL |EL Wire |OS Controller, Round 2 |My Custom Keyboard |WTT/WTB

Offline dimamantra

  • Thread Starter
  • Posts: 137
  • | (• ◡•)| (❍ᴥ❍ʋ)
Re: Anyone know Javascript - Building a Chrome browser extension
« Reply #4 on: Thu, 14 March 2013, 15:23:53 »
Did you install the plug-in on Chrome?

The functionality of this is suppose to pop open a new page when I drop a certain string of text into the input field.

The problem right now is that the current version of the plug-in does not return anything when I enter a string of text.

I will test the suggestion you made and see what I can get it to do.

Thanks for the advice.