Phonegap inappbroswer events w'ont fire - events

i am using phonegap latest version (3.4.0) and i am trying to implement google aOuth login.
i have added the InAppbroswer plugin to my project, and tryed to use the object events (loadstart,loadstop,loaderor,exit) but is seems that they just dont fire.
my code is very simple, it looks like this:
ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstart', function() { alert('start' ); });
i am running the app on Ripple eulator
i have looked for solution all over the web and have'nt fine one.
so my question is if anybody know of a working sulotion for this?
Thanks for All.
UPDATE
. i have tryed inappbroswer plugin on a fresh new Phonegap app i created just for testing this, and the plugin doesn't work! my phone gap version is 3.4.0-0.19.7 and the inappbroswer version is the latest. i installed the plugin via the CLI with the command cordova plugin add org.apache.cordova.inappbrowser
Also i have tryred to run this on normal android emulator and nothing good so far..
the plugin docs is right there

This is not an answer to your question but rather an alternative easy solution, Its easy to use and you don't need to go about listening to browser events. https://github.com/oauth-io/oauth-phonegap

Related

Nativescript hot reload JS code

While i can hot reload XML in Nativescript i am unable to hot reload JS changes. Is this even possible?
I run 'tns livesync ios --emulator --watch'.
My editor is Visual Source Code and I use the NS plugin for it.
Thanks!
NativeScript itself does not yet support hot-reloading of JS files as of version 2.20.
There is a plugin called nativescript-liveedit that allows hot reloading of JS on the Android platform. The plugin is not "perfect" but; it works in the majority of the cases and allows you to configure related files and files to auto-restart on (i.e. if you change a singleton)
(Disclaimer: I'm the author of the plugin)

slow scrolling when using responsive bootstrap theme

I am using a bootstrap 3 template and have noticed on some that scrolling is not smooth and kind of bumpy. I am not even sure what to look for. This only happens in Chrome. It does NOT happen in Safari or Firefox.
Is this a javascript or css problem? I have never run across this before.
This seems to happen worse in Chrome for mac, but also happens in chrome for windows.
It seems to happen when I make the window smaller and then make it bigger again. If I leave the window the same size, it seems to scroll fine.
Link:
http://demo.phppointofsalestaging.com --> Click Sales then resize the window in Chrome and then scroll down and then up. You will notice it is very bumpy and not smooth
:root { scroll-behavior: auto; }
Add this simple code to your custom CSS file.
"scroll-behavior" declared as "smooth" in bootstrap css/bootstrap.reboot.css.
So we need to overwrite it using our custom css.
The problem is in the jquery.nicescroll plugin that is used with the theme, the function jQuery.fn.scrollTop make the problem, it takes more than 75% from the cpu when run. my solution is :
You are using the jquery.nicescroll plugin version 3.4.0 use the latest version currently version 3.5.0 available.
If not working as expected, downgrade to version 3.2.0 I'm using it with my site without any problem.
Also check that if the hwacceleration in the Configuration parameters of the plugin is set to (default: true).
Update 1:
nicescroll plugin is a solution to have a custom scrollbars compatible with desktop, tablet and phone devices and to override the default scrollbars of the browser " more information her ", "you didn't see the diffrence because the plugin used in your project works when your browser window under 767px" so another solution if you don't need it you can remove the plugin from your files by following this steps:
Delete the plugin file (jquery.nicescroll.js) from your script folder.
Delete the plugin link from all your files.
Delete the plugin function lines (21 to 36), (49 to 66), (149) from (unicorn.js) file.
Update 2:
I made some tweaks for the (unicorn.js), download it from her, then replace your original one.
Hope this will help you.

Updating Firefox addon jsm module code without browser restart

I am developing a Firefox addon that is loaded from a directory instead of an xpi, Firefox extension proxy file. The extension is based on jsm modules.
Is there a way to update those modules to reflect the code changes. The only way to do it now is to close and restart the browser but that its not a sane way to develop anything.
Tried to:
Components.utils.unload('resource://myextension/mymodule.jsm');
Components.utils.import('resource://myextension/mymodule.jsm');
but changes are not made.
Got the answer from Victor Porof. In order to make this work you need to clear first the cache:
var obs = Cc["#mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
obs.notifyObservers(null, "startupcache-invalidate", null);
Hope this helps anyone

Start firefox extension using folder

I'm new to Firefox extension development. I have gone through some basic tutorial. When I do as shown in the tutorial by placing the folder into profile folder/extensions folder, or in profile folder it made no change in the extension installation after restart.
Then, I have gone through this tutorial as well. I tried using the pointer object also. This also not working for me.
Firefox version I'm using is 14.0.1,
And When I try to install ESPN Crickinfo (you could be able find extension on-line) extension, It also not working. I couldn't open the options page of this extension even.
Any suggestions on this problem???
Try using a fresh profile http://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles

xcode 4 + phonegap + sencha touch … not update JS upon build?

I have a similar issue to xcode 4 + phonegap ... not update JS upon build? but with the inclusion of Sencha Touch.
The problem is html changes are recognized but changes to javascript files are not seen when running the app in the simulator. Here's a quick list of suggestions made in the post listed above, none of which worked for me:
update and save .plist
touch www
clean project (Command+Shift+K)
clean build folder (Command+Shift+Option+K)
Deleting the app from the ios simulator and relaunching works but that quickly becomes a hassle. Sencha Touch takes care of its own caching using localstorage. Even though they give you the ability to define the caching strategy in app.json, I haven't found a configuration that works.
Here are the versions I'm using.
XCode - 4.3.2
PhoneGap - 1.6.1
Sencha Touch - 2.0.1 FINAL
If i understand your problem correctly i think it has something to do with HTML5 application cache. Take some time to study a little on how HTML5 Application Cache works here.
The reason your changes are not being reflected is maybe because the hash values in the app.cache file is not being changed... For the js file you wish to get changed change the hash value in comments to anything you want... This would ensure that the browser does not read the HTML & JS files from the cache but would rather download the new updated version...
When you are reloading the page in browser open the console you would get an idea of the updating process...
Hope it helps...

Resources