I'm developing an application using Mozilla Prism. Unfortunately, Prism has its pop-up blocker activated.
I tried to disable it by inserting a line like
user_pref("privacy.popups.policy", "1");
or
user_pref("dom.disable_open_during_load", false);
into the webapp.js, which resides in the directory of the Prism application. However, this did not work, pop-ups are still not working. Any ideas?
There's a bug about this you can vote/comment on here.
https://bugzilla.mozilla.org/show_bug.cgi?id=503841
adam
I added the following lines inside prefs.js located in
For Win XP: /Documents and Settings/[username]/Application Data/Prism/[app name]/Profiles/[prism profile name]/
For Vista: /Users/[username]/AppData/Roaming/Prism/[app name]/Profiles/[prism profile name]/
user_pref("dom.disable_open_during_load", false);
user_pref("capability.policy.default.Window.open", "allAccess");
Make sure your Prism application is closed before making these changes because it will overwrite the prefs.js on close, wiping out your changes.
Finally - I can use the Gmail Create Event button to create events from my Gmail Prism app.
Related
I'm working on an APP that consist of HTML and CSS using the Cordova framework.
There is a button that should open a webpage. The problem is that it opens the webpage inside of the app instead of safari.
My knowledge of Objective C is extremely limited (none) so I was hoping there would be a solution using maybe Javascript.
I've looked all over the internet but couldn't find a non-Objective C solution.
The button is pretty straightforward: <img src="img/button.jpg" alt="website">
I thought target="_blank" might do something for me but that (unsurprisingly) didn't work.
You can use inappbrowser plugin
http://cordova.apache.org/docs/en/3.3.0/cordova_inappbrowser_inappbrowser.md.html#InAppBrowser
Detect click on link using javascript or jquery and use this following code
window.open('http://www.google.com', '_system', 'location=yes');
I found the answer to my problem:
Opening all URL's with Cordova childbrowser
Only problem is that it automatically opens twitter.com because of the share button for some unknown reason. I'm guessing this is because of an api call it's performing upon being loaded.
Is it possible to open the Control Panel (Windows) using a hyperlink on a webpage? For example, I'd like to make something similar to Windows Help (but online), where an article could have a link to (say) the "Internet Connection Wizard". It'd be great if this is possible to do.
I don't think that's a good idea, but when using IE you can try this:
<html>
<body>
test
</body>
</html>
You can take a look at clickonce - make a small application, that will open C:\Windows\system32\control.exe; that should work as long as you use IE and your end user have .NET installed on his machine.
If the website is local only of course.
You can bring up the control panel and drag one of the choices from the control panel to the desktop.
Then right-click the desktop shortcut and select properties and security.
To the right of object name, you see the shortcut link.
Example: C:\Users\{username}\Desktop\Personalize.lnk
I recently found out that in Internet Explorer (v9 at least), the "Pin it" button for Pinterest is breaking 'back' functionality in the browser. Right-clicking on it shows an entry like 'http://assets.pinterest.com/pidget.html' as the previous page.
Looks like Pinterest is adding an iFrame and IE is adding its address to the history. Clicking 'back' doesn't do anything. Is this a known issue and is there a fix for this?
well, as a temporary solution (other than removing the 'pin it' button), from reading their code, I believe (not tested) that you could add a part to the <script> call to disable logging, like this ...
<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js" data-pin-do-not-log="true"></script>
This works but doesn't apply for me because I load the script asynchronously and I use a load command, so what I did was I copied the pinit.js file locally to the server, and changed the part that says
if(a.v.config["do-not-log"]||a.a.doNotLog===true)
to
if(a.v.config["do-not-log"]||a.a.doNotLog===true||true)
looks like it's doing some sort of log in an iframe.
I was having the same problem. I added the website to my list of restricted sites by going to "Tools", then "Internet options", then "Security". It seems to have solved the problem.
I've raised it with PInterest here https://help.pinterest.com/requests/884162
Thier response. Pretty much a brush off.
Hi ,
Information on how to add the Pin It button to your website or product pages is available here:
http://pinterest.com/about/goodies/
More advanced documentation is available here:
https://help.pinterest.com/entries/21101982
We regret that we're unable to provide coding support. Because issues with adding the Pin It button can be caused by conflicts with different parts of your setup it is usually best when someone that is familiar with your setup troubleshoots it. You may also want to try searching the web to see if others have had similar issues especially people that are using a similar site platform or language.
We request that you use our help articles to get the information you need as quickly as possible. If there’s additional information you’d like our team to know, you can reply to this message.
Thanks for writing and happy pinning!
The Pinterest Team
This was a temporary bug when we first pushed the new Pin It button and should no longer be an issue, since we removed the logging frame shortly after it was reported. Sorry for the trouble!
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 trying to have some fun with dashboard widgets, so I tried a simple application :
There will be a button over the widget which when clicked will open
StackOverflow website in safari.
To implement it, I tried this:
Created a custom dashboard widget.
Added a button to it from library.
Associated gotoStackOverflow handler with onclick event.
in body of function gotoStackOverflow, I wrote this code:
window.open('https://stackoverflow.com/','Stackoverflow','width=400, height=300');
When I 'Run' the application I found no browser window appearing on click of the button.
Can anyone suggest me where I may be wrong or/ and some useful links to play with dashcode and dashboard widgets?
Your code runs fine, when I recreate it. Maybe you have pop-ups blocked in Safari?
have you added
<key>AllowNetworkAccess</key>
<true/>
to the plist? if not the outside world will not be available.
I have used following code to solve my problem:
function gotoStackOverflow(event)
{
widget.openURL("http://stackoverflow.com/");
}
cheers... :)
Miraaj