I need to pop up dialog box in-front of screen while browser minimized or not used or tap not used
I mean
1) I open http://exampe.com/popup.html where jquery script pop up a dialog box every 5 min asking to click close button to close it. it is working fine
2) Now I minimize it OR open another tap OR open another browser where I browse another website (www.google.com or any others)
3) I need to popup same dialog box every 5 min in-front of screen
Is it possible?
thanks
Related
I'm using
dialog.showMessageBox([browserWindow, ]options[, callback])
to confirm a delete operation.I expect the user to close the dialog box first in order to perform some other operations.However, when the dialog box pops up the user is still able to click other parts of the window and on doing so the dialog box minimizes automatically.
Is there a way to restrict a user not to do anything else unless the dialog box is closed ?
Note: On Atom Editor do the following:
File -> Open File , this results in a dialog box for opening a file and while this dialog box is opened, the user is not able to click on anything on the main screen. This is the same behavior I'm looking at.
Check out this feature that was recently added: https://github.com/electron/electron/pull/6140
I have a Google Chrome Extension that uses the Background.html and background.js files to show this popup window when the chrome extension icon in the tray menu is clicked on....
Inside my popup is a button to generate a screenshot image of the current tab URL and it then uploads the image to my server and fills in the text input with the URL of my image upload.
I am now wanting to add the capability to select a region on the webpage screen and generate a screenshot image cropped to be just the content inside the selected region like this image below shows the region selected on the page....
My roblem now is that I cannot simply have a button in my popup take me into region selection mode on the page. I could but it would close the popup window and I have researched and found out that you cannot programtically open the popup.
So once the popup would close, I would no longer be able to edit the record loaded in it before.
I am trying to come up with a new solution to achieve my desired result.
Idea 1
Move all the functionality that my current background popup has into a modal window displayed on the actual webpage.
This would be a big change as it would require a lot of message passing as the modal code would not have access to theextension API which is used to generate the screenshot and get all the tabs data.
I could then open a modal that looks like my popup in the image above when the extension icon is clicked on.
When the generate screenshot button is clicked it would then send a message to the background script to get the tab API and generate the screenshot and then send it back as a message to the content script in the page.
As for my new feature of selecting a region and creating image of that region. The modal would have a button to do that and on click would hide the modal window. Next it would let me make the selection which on edn would send a message to background again and generate a screenshot and crop it to the coordinates of my selection and return it back in a return message to the content script which would then show the hidden modal window and update the image inside to show the new image.
This is the hardest way bu the best I think.
Idea 2)
If it is possibble even, on a button click inside my current popup would then launch a new popup window of the current page and allow me to make my selection region and generate the image which on completion would close the popup window and send the result back to my extension popup.
I do not know if this would work because I am unsure if the extension popup would auto-close when I click the new popup window?
Does anyone know of other way to accomplish this or if my ideas would be practical?
You can look at Adblock Plus for inspiration.
They have a popup with "Block Element" button that switches to "now interact with the page" mode.
After the user clicks, they open follow-up UI injected into the page.
In any case, clicking outside the popup will make it lose focus, which closes it by design.
You could instruct the user to click your button again after they interact with the page, or you would need to inject some UI into the page itself.
I found this nifty popup window JavaScript code that I like over at How to Auto Popup a CSS3 Modal Window When Page Loads?
Problem is that I want the user to simply click away from the box and that would cause it to close.
I tired to use self.close () from http://www.javascript-coder.com/window-popup/javascript-window-close.phtml but I cant figure out how to apply to everything else around the box. So when the users clicks anything outside the box it will close the popup.
Along with that I want to make sure that when the user closes the popup that it does not return during their php session. So basically unless they close their browser and bring it up again it will remain closed.
I am using the split button dropdown from twitter bootstrap in my chrome extension.
When I use it as a dropup, everything works fine. However, if I use it as a dropdown, the size of the popup increases when the menu is displayed.
Can this be avoided? I would like the dropdown menu to be displayed below the button but not increase the size of the popup.
I am trying to mimic the popup menu shown in the Evernote Chrome extension popup for selecting the article, selection or full page clip.
I have some jquery dialogs added in my application where in one scenario I open up a 1st dialog and upon entries into some field I am prompted with a message containing some server side messages and that prompt is again a 2nd jquery dialog. that means i have 2 dialogs opened over each other. so when i click on the top most(2nd) dialog then both the dialogs' $('#div1').dialog('close') and $('#div2').dialog('close') are called I am redirected to another page. Now here is what the issue arises, I am on new page with both dialogs closed, now if I open up the 1st dialog again it opens up but with everything frozen. I mean it literally takes no input but a cursor keeps blinking in first field. This happens only in Firefox, in Chrome it works like a charm.