Custom CSS for Facebook - css

Is it possible to make a wrapper-website that will display official Facebook page with my CSS? It should be something anyone can access for their FB profile without my page storing any information.
Please no FF plugins and similar!
I know that AJAX can not load page from another domain, but maybe something else...
Maybe load it in iFrame and inject my css in there somehow???
Also, would that be legal?

You can load facebook through an iframe
You can't load your own CSS inside of that iframe
It's limitations of iframes and how HTML works

Related

Control how “Finish” URL is openened - DocuSign in an iframe

I am displaying a DocuSign powerform inside a Salesforce Community page. When the user clicks “Finish” on the DocuSign form, I want the finish URL (which I’ve configured in the DocuSign settings) to open in the parent window - NOT inside the iframe.
I’ve seen suggestions that I might add the tag with target = _parent to my iframe HTML, but I’ve tried this a couple of different ways without success. Has anyone done this, and if so - exactly how should the syntax look? Or - perhaps there’s a way to put JavaScript into the DocuSign URL field?
I’m hoping I don’t need to do something more complex than an iframe (I.e., embedded signing) to accomplish this.
The page you currently redirect to, add Javascript like this:
window.top.location.href = "http://www.example.com";
The .top part here, means the parent iframe, and then you can switch it to whatever page you want.

how can i remove the social bookmark plugin using html or javascript

sory guys, click the first link you will see the image i been mark by red, after you click the second link, you will see the arrow.
1) http://s261.beta.photobucket.com/user/minaekoz/media/satu.png.html
2) http://s261.beta.photobucket.com/user/minaekoz/media/satua.png.html
Question :
That is social bookmarking site i use to promote my blog but i want to remove the plugin after somebody click that link in the first image.
how can i remove that plugin in the second image after user click the link at the first image?
*sory if my english so bad
I'm not sure how your page is embedded, I guess it's done using frames or an iframe? This would be important to know, but you'll most likely be able to use some javascript code like this (called in some element's onload event (e.g. <body>):
if (window.top != window.self)
window.top.location.replace(window.self.location.href);
I think you can add it through using a custom BlogSpot template or maybe with some of the widgets as well.
Probably you can't. That social bookmarking site will probably open your website in an IFRAME, and therefore, clicks in your page cause IFRAME navigation, and not browser navigation.
Since your site, and the IFRAME site are different, the javascript in your site cannot access the DOM (Document Object Model) in the other site because SOP (Same Origin Policy).
You can disallow that your website run in IFRAMEs by using the X-Frame-Options http header though, but I would leave it like that.
Cheers.

Diffrent CSS-Styles for Facebook Iframe

Anyone who has a good idea, how to add additional styles to an facebook iframe?
Whats wrong with CSS you can add link to an external sheet on each tab
Check out this question about applying css to an iFrame. If the iframe content is on a different domain, like what happens in the case of Facebook iFrame content on your site, you have no control over it due to cross site restrictions. Some older Facebook plugins allow to you specify a stylesheet on your server that they download and import to their server, but most of their newer plugins to not allow for this. Also, their terms of service often state you cannot attempt to the modify their iframe content embeded on your site.

How to get url of the website in iframe?

how can i get url of the website which is in iframe, when i click on any links in website in iframe it is redirect to another page in the iframe then how can i get the page url.
can u help me. thank you.
You can use jquery to make it easier:
alert($("#iframeid").attr("src"));
You can also use jquery contents() to retrieve or manipulate any tags inside that iframe. example:
$("#iframeid").contents().find("a").css("background-color","red").end().find("title").text();
Unfortunately, you don't really have much control over an Iframe once it loads. I think pretty much the only thing you have control over is the ability to reload it with a new URL programatically.
If the page loaded by the Iframe is part of your website (not 3rd party), you can process the request server-side.
From javascript? If you can run some JS inside the iframe:
alert(document.location.href);
If you can't - need to get a reference to the iframe in question:
IE:
alert(document.getElementById(iframeId).contentWindow.document.location.href);
FF, Safari, Chrome, etc:
alert(document.getElementById(iframeId).contentDocument.location.href);
As mentioned - you wont be able to do this if the URL that is loaded is not from the same domain as your website.

Embed asp page without iframe

I want to embed an .asp page on an html page. I cannot use an iframe. I tried:
<object width="100%" height="1500" type="text/html" data="url.asp">
alt : url
</object>"
works great in ff but not ie7. Any ideas? Is it possible to use the object tag to embed .asp pages for IE or does it only work in ff?
I've solved it in the past using Javascript and XMLHttp. It can get a bit hacky depending on the circumstances. In particular, you have to watch out for the inner page failing and how it affects/downgrades the outer one (hopefully you can keep it downgrading elegantly).
Search for XMLHttp (or check this great tutorial) and request the "child" page from the outer one, rendering the HTML you need. Preferably you can get just the specific data you need and process it in Javascript.
You might be able to fake it using javascript. You could either use AJAX to load the page, then insert the HTML, or load "url.asp" in a hidden iframe and copy the HTML from there.
One downside (or maybe this is what you want) is that the pages aren't completely independent, so CSS rules from the outer page will affect the embedded page.
Well, after searching around and testing I don't think it is possible. It looks to me like IE does not allow the object tag access to a resource that is not on the same domain as the parent. It would have worked for me if the content I was trying to pull in was on same domain but it wasn't. If anyone could confirm my interpretation of this it would be appreciated.

Resources