avoid chrome popup extension to close - popup

Is there a function that allow me to select text when the extension
stays open. Normally when I Use the extension popup and I Click outside the
extension the extension close. Is there a wat to avoid this.
Thank you so much

Unfortunately there is currently no way to keep the popup open once you focus out of it. This is by design.
If you would like to always show something while interacting with the page, perhaps the experimental Info bars or even Desktop Notifications would work?
Hope that helped!

The only way to keep it open is to right click over the extension icon (button) and select "Inspect popup" the extension popup then show up and remain open but of course the debugger window show and this not a fix obviously still it will maybe inspire a hack... if someone is skilled enough and share the solution with all of us.

I encountered the same problem and I've thought of a possible solution (though not tested it):
Use your background.html to store the content of the popup action and upon loading the popup, you fetch the content via the default messaging for chrome extensions.
When doing all kinds of other stuff, like XHR's or something, I think you should do that in background.html too, so the requests won't abort if you close and you can do something with the result. Then when a user re-opens the popup, he'll see the result of his previous action instead of the default screen.
Anyone tried something like did already?

As far as I know you can't persist a pop up menu but my workaround has been using a content script to append a menu on page load. After the menu is appended you can toggle the menu via messaging between the background script and the content script.
If you want to encapsulate the menu from the page it's deployed on you could wrap your menu in an iframe. This could add complexity to your project since you would have to deal with cross origin issues and permissions.

There is an alternative hack for this. You can make use of chrome local storage to store the metadata as needed. Upon restart you can read that metadata and render the desired content. You will also probably clear that metadata after you have completed performing the operations based on that.

Related

How to close System dialogs that appears on app crash?

I'm using xcuitest framework to automate mac application. I get system dialogs when the app is opened again after it crashes. I want to handle the dialog programmatically. But the dialog appears under the process `UserNotificationCenter' instead of the application under test. How can I handle the alert in such case?
You have two options:
Use InterruptionMonitor (documentation, use-case). This
approach is however kinda old and I found, that it does not work for
all dialogs and situations.
Create a method, which will wait for some regular app's button. If the app's button (or tab bar or other such XCUIElement) is visible and hittable after your app started, you can proceed with your test and if it's not, you can wait for the UserNotificationCenter dialog's button and identify&tap it by its string/position.
I'm using the second approach and its working much better, than the InterruptionMonitor. But it really depends on your app layout and use-case.
You should be able to revent it from appearing in the first place. Something like:
defaults write com.apple.CrashReporter DialogType none

Property additionalActions of NSUserNotification seems not working?

To understand NSUserNotification better, I wrote a little test app playing with this class.
So far so good, except that no matter how hard I tried to feed the additionalActions property with array of NSUserNotificationAction objects, it never showed any difference but only one action button and a close one.
My expectation for this property is that the notification would show a pull-down menu containing the additional buttons I offer as it does in the Mac App Store update notifications.
Am I missing something? Or are you having the same problem, since it is a bug awaiting Apple to tackle?
Can you please try to click and hold down the action button in your notification? Does it show a drop-down menu of additionalActions?
Update
As it turns out, you can show the little chevron next to the action button by setting a true value for the private _alwaysShowAlternateActionMenu key on the notification. In Swift 3, it would look like this:
notification.setValue(true, forKey: "_alwaysShowAlternateActionMenu")
However, as I mentioned this is a private API and I strongly advise against using it if you want to distribute your App through the Mac App Store.
It is probably a bug. Setting up additionalActions will create the list, but not the little arrow icon. Holding down on actionButton will show the menu with the number of actions you set.
Besides setting additionalActions will cause several other problems. I will save this for another question.
Refer to another question.
show NSUserNotification additionalActions on click
P.S. I am using El Capitan APIs

Hiding workflow re-assign button in Maximo

Is it possible to hide the re-assign button in the workflow dialog box for the users? and if so how?
Thanks
my solution may not be the best one, but it works for me. I hid the button using CSS.
Just go to the Application Designer app and use Export system XML action from Select Action dropdown. Then pick LIBRARY XML and save it somewhere on your disk. Open it (using WordPad preferably, Notepad is causing some issues when importing back to Maximo) and CTRL+F find Complete workflow assignment dialog. Go down a bit and you'll see <pushbutton> with label Reassignment:
<pushbutton id="completewf_b_4" label="Reassign" mxevent="directorinput" value="reassign"/>
Add textcss="reassign_btn" (the name is up to you of course)
<pushbutton id="completewf_b_4" label="Reassign" mxevent="directorinput" textcss="reassign_btn" value="reassign"/>
Then save the file and import LIBRARY.xml back to the Maximo using Application Designer app again. Then just edit your maximo.css file (located somewhere in \applications\maximo\maximouiweb\webmodule\webclient\ depending on which skin you are using) and add:
.reassign_btn { visibility: hidden; }
Hope this helps :-)

disable back button on in ltk wizardinputpage

I'm doing a plugin in Eclipse IDE in order to do a refactoring. I'm using LTK, the point is: I don't know how I can disabled the back button after the preview. I've tried to create the RefactoringWizard using some flags like 'NO_BACK_BUTTON_ON_STATUS_DIALOG', but I think it is not the rigth way to do it.
The poblem I have in the background is that when I push preview and then push back, and preview again, the preview box shows the change related with the refactoring twice!.
I think the best solution is disabling the back button after the preview because this is the solution I have seen in others plugins.
Sorry because of my English and thanks beforehand.
The method org.eclipse.jface.wizard.WizardDialog#updateButtons disables the back button when currentPage.getPreviousPage() returns null. So, I suggest you to override the method org.eclipse.ltk.ui.refactoring.RefactoringWizard#getPreviousPage to return null.

open a pop up window without using javascript

how to open a pop up window in code behind(C#) without using javascript.
Besides the fact that popups piss off a lot of people, it is not really possible to do so (if you don't consider target="_blank") without using javascript. Code written in code behind only generates client side code (which can include javascript) or executes some serverside stuff.
There might be other workarounds using flash or silverlight but I'm not sure about that. Maybe if you clarify your goal a little bit more I can give a better solution to your problem.
That is impossible because of "The code behind runs on the server; you need the popup to appear on the client machine. Therefore your code behind can't trigger a popup".
Alternatively, you can show a panel in the page as pop-up window, by seting it's z-index and giving absolute position.
The code behind runs on the server; you need the popup to appear on the client machine. Therefore your code behind can't trigger a popup.
Also, if you use javascript you'll probably find that the client's popup blocker prevents the new window from appearing (unless the popup happens as a direct response to a click - without posting back - in which case you can use <a target="_blank"...> if you really don't like javascript).
I do not think that is possible . what you can do offcourse is to open a new window with defined small width/height and all menus are stripped...
Just add attributes to a link button or to a button in code behind. Try this code to page load or to the button event handler.
Button1.Attributes.Add("onclick","javascript: SP.UI.ModalDialog.showModalDialog
({ url: 'PopUp.aspx', title: 'Pop Up Window', width: 600, height: 500 }); return false;");