I'm on a web page and selected a few words. When hitting 'control-C' or select 'copy' from the context menu, it pops up a dialog saying: your browser has refused the operation, open about:config and set signed.applets.codebase_principal_support to true.
What is this flag and its effect? Why it needs to be set to true? Why doing the same on other pages does not trigger this problem?
The browser is a firefox on its latest version.
Related
I'm trying to open a window using noopener property and target=_self. Essentially what I want is to open the URL in the same tab while preventing it to have access back to the originating URL.
I'm trying with this syntax:
window.open('http://my-url.com', '_self', 'noopener');
However, this opens the new URL in a new window.
Is there some inherent functionality (maybe the browser back button?) which prevents a URL from opening in the same tab without having access to the previous window ? The docs say nothing about it (https://developer.mozilla.org/en-US/docs/Web/API/Window/open).
Thanks,
Chris
window.open explicitly opens a new window.
You can use location.assign to navigate to a new page in the current window. (Or just use a normal link.)
I guess you’re worried about “tabnabbing”, right? That only applies to windows opened from your page (e.g. using _target=blank or window.open).
Setting noopener has no effect on a normal link that doesn’t open a new window.
I think location.replace() is what you want
window.location.replace("http://my-url.com");
replace() removes the current URL from the document history.
With replace() it is not possible to use "back" to navigate back to the original document.
my extension close when link in the extension is clicked
How to keep extension pop up to remain open when new tab is clicked
In general, that's not possible as stated in Chrome Extensions FAQ:
Can extensions keep popups open after the user clicks away from them?
No, popups automatically close when the user focuses on some portion of the browser outside of the popup. There is no way to keep the popup open after the user has clicked away.
However, if you inspect the popup, it will stay open as long as you don't close the Developer Tools window.
For end users, the only thing you could do is use a tab instead of a popup if that works better for your use case, or just inject your code into a specific tab to show your interface on top of/next to a page, as some extensions like Siteimprove do.
I am working on a sharepoint page and want certain links to open in a new tab not a new window. I haven't seen any way to do this other than have server access or doing some invasive coding. I'm not sure of actual version of SP but think it's 2007.
IE version is v8
I checked code in edit mode and can see the target blank bit but as I said it opens in new window not tab.
Thanks
Andrew
_blank option for target param instructs the browser to open hyperlink in either new tab or window. But it depends on browser config or how link has been clicked on (middle click, ctrl+click or normal click) how the link would be opened (new window or new tab).
Is there any way to modify chrome tabs to remove the button that closes the tab?
I've read through chrome develope tab. but I don't see any mention of the close button.
Not possible at the moment without forking the whole chromium project. See bug report #50913 (Status: WontFix).
Possible workarounds:
If you right click on a tab you can Pin Tab. This will remove the close button but you can still close it with ctrl+w. Unfortunately, this will also remove the window title.
The close button is removed if the width of the tab gets very small.
Have a look at the same question on SuperUser: How to disable the close (X) button on Google Chrome tabs?.
Maybe you like to look at the source code of Chromium and fix this? I think you have to start here: tab.cc.
Edit: The fix below only worked between Chrome version 69 and 71.
It IS possible now for inactive tabs!
I have had lots of problems while trying to switch tab while having 10-15 of them opened, accidentally closing some important tab with lots of text typed which isn't recovered by Ctrl+Shift+T
Here how to do that:
1) Open the Google Chrome browser and type the following text into the address bar:
chrome://flags/#close-buttons-inactive-tabs
This will open the flags page directly with the relevant setting.
2) Set the option named Close buttons on inactive tabs. Set it to Disabled using the drop down list next to the flag's name.
3) Restart Google Chrome by closing it manually or you can also use the Relaunch button which will appear at the very bottom of the page.
4) The close buttons will disappear from inactive tabs.
Before:
After:
That's it!
Source - https://winaero.com/blog/remove-close-buttons-inactive-tabs-google-chrome/
There are now Chromium-based alternative browsers which offer this - I really like Vivaldi, where not showing the X button is just one of many customization options. Also, because it is Chromium based you can install and use any Chrome extensions. It is perfect if you have many tabs open and need more of the power-user type options.
I noticed that Gmail is not obeying my browser settings for tabs.
For ex:
In Firefox3.6.10, I have unchecked the option "When I open a link in new tab switch to it immediately".
But still when I do CTRL+CLICK on a mail, it opens in a new tab and switches to it.
or
In IE8, I have selected "Always open pop-ups in a new window" but when I do CTRL+CLICK on a mail, it opens in a new tab instead of a new window.
My question is
Is it possible to override user's browser settings?
I was curious about how CTRL-click and SHIFT-click work on these gmail "fake JavaScript links" myself (they appear to ignore browser settings), so I did some testing.
gmail CTRL-click does obey browser "new window/popup" settings (in Firefox the default is "open in new tab", in IE8 the default seems to be "open in new window".) If you change IE8's settings to "Always open popups in a new tab", then you get the same behaviour as Firefox. So gmail CTRL-click is very likely just using "window.open()" in JavaScript, and it's really nothing special. I seriously doubt there's any way to force a new tab to open in JavaScript. Like Yonizaf said, what you observed doesn't seem possible.
gmail SHIFT-click probably uses this method to try to always open a new window (and never a new tab) in JavaScript (window.open() with window dimensions):
JavaScript open in a new window, not tab
As far as the focus thing goes, I noticed that in Firefox new gmail tabs always get the focus, regardless of the "when I open link in new tab, switch to it immediately" setting (like you said), but in IE8 the behaviour seems to be controlled by the "Always switch to new tabs when they are created" setting. I'm guessing this is probably just a result of how Firefox and IE's developers chose to handle new tabs that are created by window.open(), and there isn't much you can do about it, except as Yonizaf said, try to use the window.focus() method (I have a feeling it may not work in IE, though). In fact you can test this for yourself in Firefox and IE8 (disable your pop-up blocker first). I pasted the following URL into both Firefox and IE8 (with "Always switch to new tabs when they are created" disabled, and "Open popups in new tabs" enabled):
javascript:window.open("http://www.google.com", "_blank")
In Firefox, the new tab was opened in the foreground. In IE8, the new tab was opened in the background.
I don't like these JavaScript "fake links" personally, because you lose the middle-click and right-click functionality, and they trigger the pop-up blocker.
the first one is possible, since this options only meant to change the default behavior for links.
the mail list in gmail aren't normal links, it's using javascript.
for the second example, the option can't be overriden by the webpage, but using ctrl+click always means open in new tab, so it's overriden by the user, not the page.