I'm writing an application using node.js which requires me to open a window in a browser and fill a text field.
I have tried using opn. Fact is it just opens the tab but doesnt allow me to control it.
these kinds of stuff mostly helpful for acceptence testing and you can do it using "selenium"
other wise if you just want to open a window and fill a text field.
I believe the page you are trying to open is already been generated. if yes, then why don't you modify that page to accept a query string e.g: "?q=some-text" and fill that text field if you find.
Let me know if you have any other question
Related
I'm building extension for Chrome using manifest V3. Interaction I'm trying to achieve is:
User clicks a button in context menu.
Extension communicates with the server and receives some string in response.
User clicks another button in context menu and said string gets pasted where their cursor is.
I see two ways I could achieve it and I'm not sure which one makes more sense (or how to get either to work, really):
One would be to have said string put into clipboard and then have user access it with paste command.
Second would be to have a separate context menu button which upon pressing pastes the string where the cursor is.
Either solution would work for me, however I prefer one that asks for less permissions from user (I'm already accessing storage, requests and context menus). So far I was also able to avoid using background workers and event pages, which provided some convenience when working with context menus - I'd like to keep it that way, but I'd rather have my extensions actually working ^^
Unfortunately Chrome documentation is rather confusing, bordering on circular, when explaining how to achieve something like this, especially within Manifest V3. How do I go about it?
I wanted to make specific inputs go into another part of a site (e.g. https://myexamplesite.com/anotherpartofit.html)
And also make those specific inputs be the ones that someone saved it in.
An example of what I think would work is: Get value from input 1 from /apartofit.html and put it in input 2 at /anotherpartofit.html and make it non-editable
If it needs to use a database, I would prefer if you could help me with firebase (Google's Database). But in my knowlege, it probably needs to use javascript, so I'll be tagging it, if it doesn't, let me know!
in visual studio or notepad or every offline web creating spaces you can't but if you buy a domain or simple , online site , you have to crate a page and get the link of that page then open another page create a button set the button's href to link of pervious page finally hit the button !
I am relatively new to both programming and developing chrome extensions. I am developing a chrome extension that will do this simple thing.
On selecting a text, show a button on clicking which the text will be highlighted. (Somewhat like the pin button)
When i revisit the page I can see what where the areas i highlighted.
So currently I have a extension working which can save the bookmark to the database. This is the link from which i got this understanding http://markashleybell.com/building-a-simple-google-chrome-extension.html. If you want i can share the actual code also but it is going to crowd the question.
I think I can make get the selected text to go in to the database if i use contextmenus. But this is what i intend to do is
select the text
A icon comes up (How do i trigger the jquery to add the button, which chrome api i need to use and in which file i should put the code)
3 On clicking the icon the text gets highlighted. (how should i change the DOM of the current page)
I can do the part of extracting the text and sending it to the Database.
The next problem i have no idea about what information I need to store in the database (Example do i need to store the start or end node) so that i can have the text highlighted when i return to the URl. How does a chrome extension start on its own to figure out what part of the page need to be highlighted.
In case you have a sample code that will be great or just tell me what is the logic and chrome api's i need to use.
I know the question is too broad but even if you have a few links that can help to understand this flow it will be great. The project i am working on it to create a far similar version of https://www.diigo.com/, with just the ability to store URL along with the highlighted notes.
How can I create a javascript prompt that floats in a fixed position on a page?
More specifically I am trying to create a floating prompt or dialog box that asks for a user ID and creates a cookie with that id number. It can't be accomplished with a simple javascript prompt because the user needs to be answer the prompt at will and still be able to access the parent window (ie modeless). Also, it must be accomplished by simply including a script (no html or divs) because it will be given to several clients and we want to keep it as simple for them as possible to implement.
This would require asynchronous javascript, correct? How would I go about creating this?
I'm writing a bookmarklet and I need to be able to prompt the user for a "password". However, I don't want it to be in clear text on screen, so I cannot use prompt.
Is there a masked alternative to prompt()?
Any other suggestion?
You can create a floating div on the current page, with a form containing a password field.
alternative: let the bookmarlet point to a particular web page. Get the password from the user on that page, and continue.
This solution does not use javascript at all, as you may have noticed. If you really insist on using javascript, you will have to create a new window using javascript (window.open), add form and input elements to it, and set the form's submit value to your web app backend.
you can of course, display a dialog box on the current page, but that will be pretty irritating to the user. Be warned.
jrh
there isn't one - try looking into Thickbox on a modal setting like this:
Open iFrame Modal
The easy, fast answer: No, there are no cross browser method like window.prompt() that masks the user input. There are however some proprietary stuff you could look into. In MSIE you got window.createPopup(), window.showModalDialog() and window.showModelessDialog(). However I donĀ“t reccomend using this approach =P
What would happen if you used http authentication for your destination? Would the UA prompt the user with a un/pw?