javascript - iframe wikipedia article without the wrapper -
i want embed wikipedia article page don't want wrapper (navigation, etc.) sits around articles. saw done here: http://www.dayah.com/periodic/. click on element , iframe displayed , links article (no wrapper). how'd that? seems javascript handles showing iframe , constructing href after browsing pages javascript (http://www.dayah.com/periodic/script/interactivity.js) still can't figure out how url built. thanks.
the periodic table example loads printer-friendly version of wiki artice iframe. http://en.wikipedia.org/wiki/potasium?printable=yes
it's done in function click_wiki(e) (line 534, interactivity.js)
var article = el.childnodes[0].childnodes[n_name].innerhtml; ... window.frames["wikiframe"].location.replace("http://" + language + ".wikipedia.org/w/index.php?title=" + encodeuricomponent(article) + "&printable=yes");
Comments
Post a Comment