Displaying Facebook in an Iframe on my website

后端 未结 7 691
萌比男神i
萌比男神i 2020-12-18 16:42

I want to Display Facebook\'s Webpage on my site ?



             


        
7条回答
  •  再見小時候
    2020-12-18 17:20

    Theoretically it should be possible to do it in the following steps:

    1. Fetch the Facebook.com's html with AJAX.
    2. Remove the undesired javascript what Zimbabao pointed or add new javascript that overrides undesired function.
    3. and then do a document.write to release the modified HTML for the browser to parse and render.

    This is the same principle how Javascript-function-overriding works with GreaseMonkey [1]. In [2, 3], you will find how functions can be overridden with Javascript.

    • [1] https://addons.mozilla.org/es-eS/firefox/addon/greasemonkey/
    • [2] Overriding a JavaScript function while referencing the original
    • [3] http://www.novogeek.com/post/2010/02/27/Overriding-jQueryJavaScript-functions-using-closures.aspx

提交回复
热议问题