The title pretty much says it all. Is there a command line switch for Chrome/Edge which relaxes the restrictions that are made to javascript on the input element of type file?
Yes I am aware there is a reason for these restrictions
No I actually don't intend to use it on a Browser such as Chrome or Edge
I want to know so I can build a hybrid app that utilizes MS's Webview2 which accepts the switches (at least I am led to believe it does)
EDIT: I want to call click() and/or add files to it.
Related
In Google Chrome, I can type the following in a new browser:
pycharm://open?file=file_name
and press Enter. The result is that PyCharm IDE will launch and open the specified file. I have also come across similar links that launch other applications.
I tried to look for information about such links but did not reach any conclusions. Specifically, I would like to know:
what is the name of such a link?
who defines those links? Since I cannot find any documentation about those links on PyCharm's side, I am led to think that those links are some form of standard command that work for every external application?
how do those links work under the hood? Is it the browser spawning a new subprocess or does the browser somehow communicate the command to the OS which takes it from there?
I can also do the above programmatically:
window.open('pycharm://open?file=file_name', '_top');
How can I ensure that the focus switches to the target application? (Right now the application does indeed start, but the focus stays on Chrome.)
I'm wondering if I would be able to write a chrome extension that would be able to toggle Switches in the browser, similar to how using the command line flag: "--disable-web-security" works.
In an ideal world, I would only set this flag for a single tab, but the ability to toggle the security flag on and off within the browser would be a good start.
Any ideas on if/how this can be accomplished?
Unfortunately, there is no API for this.
I am referring to the save feature in the 'Sources' panel of the Chrome Dev Tools. I have been using this feature for a long time in the stable release of Chrome, but after installing the build from the developer channel, I notice that once I have saved the file the first time, Chrome no longer prompts me to save and just does it automatically after every change I make.
This is quite a pain, as I make a lot of changes experimentally in the dev tools whilst debugging which I don't wish to save, I would like Chrome to save the file only when I explicitly tell it to.
Does anyone know if there is a way to disable this automatic CSS saving?
(Apologies for no screenshot, my PrtScn key seemingly won't operate when I am in a context menu)
Update:
I have reverted to the current stable build, 27.0.1453.93, and the behaviour appears to be the same.
I am having the same problem, I can only offer workarounds: use another browser, such as Firefox, for doing tests!
Alternatively you could launch another instance of Chrome with a different profile. You could also launch a Chrome "Incognito Window", it seems to not apply the filesystem mappings.
I normally use an Incognito Window or inline styles to test changes.
Alas, I learned after reading a post by Google's dev relations person
that the automatic save cannot be disabled and it seems that's the way
it's going to stay.
html5rocks.com/en/tutorials/developertools/revolutions2013
– tommypyatt Feb 21 '14 at 14:22
While not solving the issue directly, it is a decent work around:
In Chrome, in the css inspector you can click and hold the + button, then choose to add your changes to the inspector-stylesheet. It's not as convenient as directly editing in your css-selectors, but what you write will all be in inspector-stylesheet.css, so not saved to your project. Then when you are happy with your changes, you can manually put them in to your css.
I need to prevent Ctrl-w, Ctrl-t, Ctrl-n from doing their default functionality. I know removing user rights is frowned upon, but hear me out before casting judgement.
event.preventDefault() only works on lesser key combos like p, but n, t, and w are immune to client side javascript according to javascript capture browser shortcuts (ctrl+t/n/w).
I'm writing educational cloud software for kids 3-12, and I use Chrome's Kisok mode to limit their ability to screw around. I have full control of the computers in question. Are there hidden Chrome options / extensions / Windows tricks / something else that I can use to make the computer actually a kiosk instead of a "kisok"?
Also, I'm writing a cloud code editor using Ace and I want to use emacs key bindings but I keep opening new windows when I try to go down a line.
EDIT clarification: It's Chrome only because that was the spec / we control the system, but it would be useful if anyone has thoughts on ff/o/ie
Since you noted thoughts on other browsers would be helpful: Opera's kiosk mode seems more powerful than Chrome's. I believe this would give the result you want: opera.exe /kioskmode /nokeys http://your-url
Problem context:
I have a C++ program and a web presence. Currently the way things are working I have made a control panel with javascript and html. And it send commands via an unimportant communication medium to control things or get information from the C++ program.
Now, when the C++ program launches, I'm making it run a
ShellExecute(NULL, "open", addressBuffer," --new-window", NULL, SW_NORMAL);
This is a way of launching the default browser with the given address. The addressBuffer in this case points to an intermediate HTML file that quickly turns around and uses the
window.open()
in Javascript to open the final popup, then closes itself.
The result is the user now has the popup control panel that I want them to have but the user's main browser window also gets given focus, un-minimized, and placed on a different tab than the one they had selected. (Basically pops up out of nowhere and selects a another tab)
Problem:
I'm looking for a way to launch a Chrome popup, without disturbing a previously open browser window. Any ideas or solutions would be very helpful.
Lastly, it's worth noting that the " --new-window" from the code above doesn't actually open a new window like you would expect. In this case it's actually doing nothing... If it did work, none of this would really be an issue.
I know this is wordy so thanks in advance for you time!
-Michael
Alright, I came up with a solution.
Something about how ShellExecute processes it's commands was preventing the command line args to be passed in correctly.
My work-around includes grabbing the path to Chrome from the registry,
HKET_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe
Then simply doing a system() command with the chrome path "--new-window" and the web path.
Then I let the intermediate html page open it's popup and close itself.
Tada done.
Thanks.