Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (document.location.protocol=='http:'){
- document.location.protocol = 'https:';
- }
- if (document.location.protocol=='http:'){
- window.top.location = 'https://YOUR_APPLICATION_PAGE_URL'
- }
- if (document.location.protocol=='http:'){
- var applicationUrl = 'https://facebook.com/example-application';
- var canvasURL = 'http://example.com/facebook-canvas';
- var currentAppPageUrl = (document.location+'').replace(canvasURL, applicationUrl);
- window.top.location = currentAppPageUrl;
- }
- if (document.location.protocol=='http:'){
- var applicationUrl = 'https://facebook.com/example-application';
- var canvasURL = location.protocol+'//'+location.host+location.pathname;
- var currentAppPageUrl = (document.location+'').replace(canvasURL, applicationUrl);
- try {
- window.top.location = currentAppPageUrl;
- } catch (e) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement