I need to create a popup in my web app to load a unity file. For that I'm using Javascript's Window.Open.
I don't want the user to see the popup's URL or to give him the chance to alter the URL.
According to this link:
http://javascript.about.com/library/blpopup10.htm
"location can be set to yes or no to
indicate whether or not the new window
should display the location or address
bar. Note that this is a
recommendation only as some browsers
such as Firefox can disable this to
ensure that the toolbar will always
appear. In IE7 this setting controls
whether or not the navigation bar will
be displayed as the address bar will
always display in that browser. "
There is no longer a chance for me to remove the location from IE7.
I've tried to set it to location =no (and =0) and in fact it doesn't work in IE7/8 or Firefox. It does in Safari.
Since we all have had those boring spam popups that don't have the URL bar (called Location bar) that's a proof that there must be a way!
Hope that someone has the right answer.
Thank you.
Regards,
Bruno.
what about inline pop-ups? You can write your own code or see this: http://docs.jquery.com/UI/Dialog.
I dont use standard window.open javascript function at all, as in IE 8 it's IMHO impossible to hide location bar.
Inline (I mean html) dialogs have more features than window.open.
Hope it helps.
No, there is no way to get rid of that bar in IE7 - this change was brought in as a security measure to help combat phishing.
As Feryt says, you can use inline popups, which is probably a better solution anyway.
Instead of window.open() use window.showModalDialog()
You can use Chromium Application Mode which works on all browsers expect Safari and Firefox.
I don't know the exact commands/paths for linux and mac, but you can search a bit.
run this code on cmd
cd "C:\Program Files\Google\Chrome\Application"
chrome.exe --app=https://yoursitehere.extension
or
Create a shortcut:
"C:\Program Files\Chrome\Application\chrome.exe" --app=https://yoursitehere.extension
For other browsers change the chrome location with the browsers' location.
By the way, this feature can be removed because of the security vulnerabilities.
Related
Is it possible to spoof Chrome plugins?
I noticed that their names are stored in Preferences and Local State file in /Users/mainuser/Library/Application\ Support/Google/Chrome/Default/Preferences and /Users/mainuser/Library/Application\ Support/Google/Chrome/Local\ State respectively (on Mac), but manually changing the contents of these files gets treated as file corruption. Any idea how to spoof it?
Plugin information are publicly available and are easily inspected with something like this:
var x=navigator.plugins.length; // store the total no of plugin stored
console.log(x);
var txt="";
for(var i=0;i<x;i++)
{
txt=navigator.plugins[i].name;
console.log(txt);
}
I assume you want to modify an extension that you have installed on your machine in order to improve it.
You can use the Developer Mode and load the modified extension:
Extensions that you download from the Chrome Web Store are packaged up
as .crx files, which is great for distribution, but not so great for
development. Recognizing this, Chrome gives you a quick way of loading
up your working directory for testing. Let's do that now.
Visit chrome://extensions in your browser (or open up the Chrome menu
by clicking the icon to the far right of the Omnibox: The menu's icon
is three horizontal bars. and select Extensions under the Tools menu
to get to the same place).
Ensure that the Developer mode checkbox in the top right-hand corner
is checked.
Click Load unpacked extension… to pop up a file-selection dialog.
Navigate to the directory in which your extension files live, and
select it.
Alternatively, you can drag and drop the directory where your
extension files live onto chrome://extensions in your browser to load
it.
If the extension is valid, it'll be loaded up and active right away!
If it's invalid, an error message will be displayed at the top of the
page. Correct the error, and try again.
Paranoid about browser fingerprinting I guess.
If you want hide navigator.plugins list, see this plugin :
https://github.com/bcaller/plugin-privacy-chrome
See content.js#L27 :
properties.plugins = vecw({}, true);
The "real" fix is to stop the enumeration of plugins for everybody, so there is no fingerprint information (after everyone upgrades):
https://bugs.chromium.org/p/chromium/issues/detail?id=271772
If you hide navigator.plugins, that is also an identifying (single bit) feature that will make you stand out since there will be very few users who hide navigator.plugins. Which is why you'd want to spoof.
From another answer, from #Hors Sujet, https://github.com/bcaller/plugin-privacy-chrome is a great place to start how to program a spoof. You'll want to look like the vast majority of Chrome users (I'm not sure that actually exists, though.)
But what you likely really want is EFF's Privacy Badger.
Start here to see the number of bits you can be fingerprinted by:
https://panopticlick.eff.org/
And then install Privacy Badger from here:
https://chrome.google.com/webstore/detail/privacy-badger/pkehgijcmpdhfbdbbnkijodmdjhbjlgp
Im currently working on a fork of the famous web developer extension (chrome, firefox, opera). Exactly I am working on the chrome extension.
The Firefox extension is shown like that:
Chrome instead shows only a icon...
..which toggles the "pretty small" widget:
A part of my goal with this fork is to change this toggle icon to a toolbar such as firefox does.
After studying the documentation chrome extensions (https://developer.chrome.com/extensions/devguide) I came to the result that this is not possible with default settings (browser actions, page actions,...).
When I looked again at the Table of Contents in the documentation I got an idea. There is the possibility to edit the bookmarks. So it could be possible to add an additional bookmark bar/row and place the single web developer actions as bookmark with the function on it.
Is this the right way for solving this? Because at the moment I only see possibilities with more or less dirty hacks. And doing it via bookmarks seems at least dirty.
PS: I also thought about this:
The plugin is actually the same on firefox and chrome and from the same author. So when this adaption of the toolbar in chrome would be easy possible then would not have such differences in the chrome and firefox addon.
Nope, that's simply impossible.
Chrome does not support custom toolbars, and that includes "an additional bookmark bar/row".
The closest, visually, would be injecting UI directly into the top of all pages. I don't think I need to explain why that is hacky.
I am attempting to open an html file in firefox with minimal extras (toolbars, menubars, addressbar, etc). Just the html contents of the webpage, and nothing else. I want to be able to do this within linux from the terminal. I also have to do it in such a way that it works across multiple linux machines running the same version of firefox. So this removes any possibility of using a profile. I was hoping there would be a simple parameter to firefox that would allow me to turn these settings off. I dont believe there is.
The only possibility I have found is through javascript's window.open. It appears the parameter specs to window.open arent even functioning in firefox 1.5.0.9. I have read that some of them were removed in firefox 3.0+, but have not found anything regarding the version I am using, 1.5.0.9.
This is what I am using to open my .html file using windows.open...
test.html:
<html>
<body>
<script>
window.open('./rel_notes.html','_self','toolbar=no,menubar=no')
</script>
</body>
</html>
And then just running 'firefox test.html' from the terminal.
Both the toolbar and menubar still appear when I do this. What am I doing wrong? Is there a easier way to do this?
If your browser settings allow pop-ups without notifications from X source (localhost i presume?) then the following might work:
window.open('./rel_notes.html',null,'menubar=no,toolbar=no');
window.open('','_self',''); //this is needed to prevent IE from asking about closing the window.
setTimeout('self.close();',500);
Taken from a link in the link bungdito gave me:
After a window is opened, JavaScript can't be used to change the features.
So by opening test.html, and then using window.open on _self, I am trying to adjust features to a window that has already been opened, using javascript.
Source: https://developer.mozilla.org/en-US/docs/DOM/window.open
I have tried using JavaScript "AddFavorite" function in my code, but it does not work in Safari. It works in IE, I think I remember Firefox, but nothing I have tried seems to work in Safari. All I want to do is have a link on my website that people can click on and it automatically creates a bookmark in their bookmarks folder/bookmark bar.
Does this entail Applescript or something like it? Or a deeper programming language I am unaware of?
<a href="javascript:bookmarksite('Name', 'website.com')">
From the apple forums: forum-link
On the Mac side at least, Safari does not allow a website to add a
bookmark. I'm pretty sure the same behaviour is in the Windows version
as well.
I've been down this road, and what I discovered was that Safari does NOT allow bookmarks to be made with JavaScript:
Apple Forum
bytes forum
They consider it unsafe. As frustrating as this is, I get their point.
Unfortunately, most things like this tend to be browser-specific, and picky.
my JS is about level 0, but i did find this on an old article here:
One specifically for Chrome:
Add to favourites link for Google Chrome
And another on a cross-browser bookmark link:
Cross-browser bookmark/add to favorites javascript
Hope between the previous comment and these links, you get what you needed.
Chrome and Safari does not allow it for clear security reason.
You could usee a script like this:
http://www.dynamicsitesolutions.com/javascript/add-bookmark-script/
which handles many browser and has a nice fallback: show a browser customized alert with instructuion message.
Es: in chrome it says: "Ctrl+D to add as bookmark"
In IE something similar to the following would work: (MSDN)
window.external.AddFavorite(location.href, document.title);
However, this won't work in other browsers. In Firefox, I believe you can use
window.sidebar.addPanel(document.title, location.href, '');
to create a sidebar panel (not a real bookmark) but as far as I know Chrome and Safari do not allow Javascript to automatically create bookmarks. For those, I recommend giving the user the instructions to do it manually:
drag a link to their bookmarks
pressing Ctrl + D to add a bookmark
Clicking + or star icon in the toolbar
I am currently trying to open another IE window using the code below, but the toolbar and menubar is still showing under IE7, it seems to work under IE8 though. Why is it doing this?
mywindow = window.open("dataviewer.aspx?id=" + id , "", "toolbar=no,location=no,directories=no,menubar=no");
I seem to recall having to add a website to my "trusted sites" list in IE7 to get the toolbars hidden. Of course that isn't going to help if you can't control that for your visitors, but I think it was something locked down as of IE7 -- even though MSDN doesn't state that. It might be an advanced setting, or maybe it was related to some 3rd party add-on or anti-virus I had. I just know I had a website that launched a small window that was meant to be a "floating toolbar" and it worked great in IE6, but once I upgraded to IE7 the width and height worked, but it had toolbars. I added that site to my trusted sites list, and it started working again.
If that is the case for you, I'd check the advanced security features and see what is different between normal and trusted sites, and maybe fine the one setting that controls this.
It works in IE7-mode in IE9. I don't have a machine with real IE7 installed.
The directories features is no longer supported. Just a guess, but that might be your problem.
One thing to try is to specify only "toolbar=no". Once you've specified to disable one of the features, the rest of them default to no. If you wanted no toolbars, but you did want an address bar, you'd have to explicitly say "location=yes" to get them back on. So, setting just one feature to no is good enough to turn the rest of them off as well.
Try this: http://jsfiddle.net/VD8sk/
mywindow = open("dataviewer.aspx?id=" + id , "", "toolbar=no");
Edit: Maybe also try "toolbar=no,menubar=no" without the other features specified.