fb:loggin-button gets stuck [duplicate] - javascript

I am having problems getting Facebook login to work correctly in IE. The problem is intermittent. Usually, when it makes the call to FB.login, the popup appears but stays on an empty white page, XD proxy, and never runs the callback. Occasionally, the callback will run, but the window will not close - I think this may be the first time I try it after rebooting my machine (closing and opening the browser does not have the same effect).
You can see this problem on www.runescape.com/, yet with the same code on www.waroflegends.com/, the login seems to work correctly.
I have searched and found a lot of talk on the XD Proxy topic, but none of the solutions seem to work for me. I have tried adding a custom channel url and making sure the fb div is the first child of the body to no effect.

I've been experiencing the same issue in IE9, and it seemed to stem from upgrading to Flash Player 10. I'd lost hope in trying to fix it since finding an open bug at Facebook covering it. But Henson has posted an answer that fixed it for me. In the JavaScript in my site master I removed the lines
FB.UIServer.setLoadedNode = function (a, b) {
//HACK: http://bugs.developers.facebook.net/show_bug.cgi?id=20168
FB.UIServer._loadedNodes[a.id] = b;
};
and now it works. (N.B. I have not checked to see if the IE8 issue those lines were intended to overcome returns.) If that's not it take a look at some of the answers suggested in FB.login dialog does not close on Google Chrome

Try this right after FB.init:
if($.browser.msie || $.browser.opera) { // yes, this is jQuery :)
FB.XD._transport = 'fragment';
FB.XD.Fragment._channelUrl = yourChannelUrl;
}

Related

Youtube, the site itself freezing for a few seconds

i've been plagued by a problem that seem to started since Youtube's last
layout change this year.
I have for months put up and tried to ignore the freezing that happens
everytime I open a link within youtube such as an channel, an video, the homepage, etc.
I'm using Chrome version 31.0.1650.63 and I have already tested youtube without any
extensions, cookies, cache, etc but it still affects me to this day and maybe some
of you out there.
I searched every where for the solution and couldn't find any anywhere.
I did a bit of digging and testing to see what is the root of the problem and
while i'm no expertise on code or Java...I did found something.
Every time I reload a page on youtube, with it finishing loading up...this happens:
http://i.imgur.com/K9Z3vJ1.png
See that?
The purple-colored rendering, that's the cause of the lag every time I load
up something on youtube!
I notice that it repeats the same thing over and over again for like 5-15 or so
seconds before it starts loading up the thumbnails of the videos.
If you want a closer inspection of the code, here's the raw data from the timeline (that you can load up in chrome's dev timeline window):
Youtube Lag JSON Timeline file
I don't what to do with this problem and I believe it affects
me in Firefox as well but to an lesser extent then chrome.
Do any of you guys know how to resolve this problem?
Honestly I doubt that the youtube devs will fix this problem since they're the ones who caused it in the first place. (Like not being able to subscribe to some people when i'm not even at my sub limit.)
I'm sorry if you don't want to help but I don't know who else to look to besides
the experts that y'all are when it comes to web coding. If anything, I believe a userscript or something similar could help with this but how...I don't know.
I'm new to this and I apologize if the question i'm asking isn't suited for this site.
Still, thanks for reading and if you can...please reply.
That is all and thanks again.
Well I was fiddling around and looking at the source code
with chromes timeline devtools and well...
I found a temporary solution to the problem which seems to have
fixed and ended the freezing on youtube! yay~
But some things don't work with this solution and i'm at
a fault with this issue after some hours trying to figure out
how to stop the problem.
Anyways I used adblock, an extension that I have on Google Chrome, to deal
with this issue and was able to get everything fixed and working!
What I did was, in the custom filters section (check options in your
adblock extension, you should have it.) and added the following then did
some testing to see if it fixed the problem which it did!
Here are the filters I used to fix it!
||s.ytimg.com/yts/jsbin/www-pageframe-*
*www-pageframe-*.js
^^^
Yeah, that's the temporary solution as it fixes the problems but it causes the following...
You can't open the menu which contains links to your playlists, user settings, channel, etc when you click your username or profile
picture on top right of youtube.
The "..." mini-menu that you usually find on the right of a video section (to hide, subscribe, etc.) doesn't appear anymore.
Youtube's quick menu button doesn't work, however the menu is still open but you won't be able to close it. That or it's close and you
won't be able to open it...I guess.
Those are the problems I found with this temporarily solution to the freezing problem.
Yeah...but I hope this helps anyone who's having this problem somewhat well.
But it would be nice if someone has an better solution then mine hehe!
Thanks for reading and if you have a better solution, don't feel afraid to
tell! ^_^
I'll be awaiting other answers, for now...I hope this helps y'all well
in some ways hehe! =D
This certainly isn't javascript, but substituting the normal EasyList in ABP for EasyList without element hiding will fix the issue. There are downsides to this as well but for now seems to be the better solution.

skrollr mobile clicking on item returns error

I am using the skrollr plugin for parallax https://github.com/Prinzhorn/skrollr. I know it works fine on iPad 3 and iPhone 4S with version 6.1.3.
However, on an iPad 2 version 5.1.1 and several various Android devices, I have run into an issue where if I attempt to click on any link...or really anything at all...I get a message that says:
"JavaScript:Error undefined TypeError:'undefined' is not a function".
I isolated the issue to skrollr.js about line 649 initialElement.click();. If I remove that call, then the error no longer happens...except obviously I still can't click on anything.
Also, I know for sure that this is an error in the plugin itself because I tried clicking on things in the skrollr demo and get the same error http://prinzhorn.github.io/skrollr/.
Has anyone come upon a solution for this? I haven't seen it posted anywhere. Also I've already tried alternatives such as:
initialElement.mousedown('click');
initialElement.trigger('click');
initialElement.bind('click');
initialElement.live('click');
initialElement.delegate('click');
and all give the same exact error.
I find it strange that it doesn't occur in all devices, and the rest of the plugin seems to be working...so it's not an issue on where I'm importing it...heck even everything else attached to initialElement seems to be okay.
Any ideas?
Once again, I would give you a link to my site but can't due to disclosure agreement. But if you need snippets of code let me know.
Thanks for the help!! :)
Maybe give this a shot at line 644 - https://gist.github.com/JustinWUP/6032497
Changing the following on skrollr.js worked for me. [Added $() around the 'initialElement']
if(distance2 < 49) {
//It was a tap, click the element.
//initialElement.focus();
//initialElement.click();
$(initialElement).focus();
$(initialElement).click();
return;
}

IE FB.login callback not running and XD proxy window left open

I am having problems getting Facebook login to work correctly in IE. The problem is intermittent. Usually, when it makes the call to FB.login, the popup appears but stays on an empty white page, XD proxy, and never runs the callback. Occasionally, the callback will run, but the window will not close - I think this may be the first time I try it after rebooting my machine (closing and opening the browser does not have the same effect).
You can see this problem on www.runescape.com/, yet with the same code on www.waroflegends.com/, the login seems to work correctly.
I have searched and found a lot of talk on the XD Proxy topic, but none of the solutions seem to work for me. I have tried adding a custom channel url and making sure the fb div is the first child of the body to no effect.
I've been experiencing the same issue in IE9, and it seemed to stem from upgrading to Flash Player 10. I'd lost hope in trying to fix it since finding an open bug at Facebook covering it. But Henson has posted an answer that fixed it for me. In the JavaScript in my site master I removed the lines
FB.UIServer.setLoadedNode = function (a, b) {
//HACK: http://bugs.developers.facebook.net/show_bug.cgi?id=20168
FB.UIServer._loadedNodes[a.id] = b;
};
and now it works. (N.B. I have not checked to see if the IE8 issue those lines were intended to overcome returns.) If that's not it take a look at some of the answers suggested in FB.login dialog does not close on Google Chrome
Try this right after FB.init:
if($.browser.msie || $.browser.opera) { // yes, this is jQuery :)
FB.XD._transport = 'fragment';
FB.XD.Fragment._channelUrl = yourChannelUrl;
}

Javascript location.replace bug in Opera

I'm am doing a JS location.replace in Opera. There is a known bug that the location does not get replaced but updated when only the location.hash changes (see http://my.opera.com/community/forums/topic.dml?id=568931).
I was trying to do the following workaround:
var url = location.href.split("#")[0];
if (window.opera) {
window.history.back();
}
location.replace(url + '#' + newhash);
Unfortunately that does not seem work. Before I start experimenting with setTimeout, I wanted to check if maybe someone has a better idea.
I think the best workaround for this is to not work around it at all.
Reasoning: firstly, the script running in this page should be terminated if I use the back button, or history.back() is called. Hence, in your workaround above the script will (or should) actually stop running before the location.replace() call. We can not remember that you wanted to call location.replace() and do it on the page you've gone back to, because that would be a script injection security issue.
Secondly, even if this workaround worked I would very much recommend not using it. The reason is that Opera will eventually fix its bug. If an end user used a fixed Opera version and a page running your script, each click on one of your links would remove one entry from that user's browsing history..
For a proper solution, you could investigate history.replaceState() - a new method specified in HTML5: http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#dom-history-replacestate
Can you clarify a bit? I took the example from the forum link you posted and uploaded it here: http://people.opera.com/miket/tmp/replace.html. In Opera 11.61/Mac, it appears to work as expected.
Are you seeing something different? Can you explain your problem in more detail?

Sometimes FCKeditor doesn't load in Firefox

I am unable to replicate the problem when I want to but it seems like every now and then, my site using FCKeditor will load the interface but not the content (Clicking the buttons don't do anything). No javascript errors show and once it starts doing it, it usually is tough to get back to normal. The way I found to work best is to click the refresh button multiple times in a row, then the FCKeditor loads correctly. I have only seen this in Firefox
Has anyone else run into this problem or know a solution. It is a little annoying for me but I am afraid my client would be really confused
I have experienced the phenomenon you describe in FCKEditor's successor, CKEditor. Somehow, the IFRAME that contains the WYSIWYG content doesn't get loaded. What always helps is switching to source code view and back, but that's no solution.
I have seen the problem described on the Internet but with no solution.
Caching is not the problem, I think. Sometimes, if you press "reload" 20 times, it will break at the 21th time, and work again on the 22nd time.
What minimized the number of occurrences for me was to activate the thingy to the editor's bottom that shows the element path (body > p > span, I forgot it's name). I don't now why but since I turned it on, it very rarely breaks any more.
I have had this problem. I solved it by pre-loading FCKeditor in a hidden iframe during the login process so that when it got to the pages where it was used it was already in the cache.
i would strongly advise to upgrade to CKEditor which can not only be spelled out verbally without offending anyone, but also optimizes the loading time to minimal. I find it much more responsive than his F- friend.
I encountered this problem with firefox (not reproducible) and chrome (reproducible).
The solution that worked quite well in both cases was to wait for some milliseconds before initializing CKE :
setTimeout(function() {textarea.ckeditor({customConfig : 'custom/schnonfig.js'})} , 100);

Categories

Resources